From fc086418e1dd8101a5a1dd9a2084d327fde5df51 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Thu, 21 Nov 2024 18:30:20 +0800 Subject: [PATCH] luci-app-passwall2: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall2/commit/fc6923dd3a4aaed8f44cae387278ac2796aa5525 --- .../model/cbi/passwall2/client/acl_config.lua | 20 ++---- .../root/usr/share/passwall2/app.sh | 26 ++++--- .../root/usr/share/passwall2/iptables.sh | 67 +++++++++++------- .../root/usr/share/passwall2/nftables.sh | 68 +++++++++++-------- 4 files changed, 95 insertions(+), 86 deletions(-) diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/acl_config.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/acl_config.lua index 2bb7a96d5..93f96ae58 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/acl_config.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/acl_config.lua @@ -70,10 +70,10 @@ o = s:option(Value, "remarks", translate("Remarks")) o.default = arg[1] o.rmempty = true -use_if = s:option(Flag, "use_interface", translate("Use Interface With ACLs")) -use_if.default = 0 -use_if.rmempty = false - +o = s:option(ListValue, "interface", translate("Source Interface")) +o:value("", translate("All")) +local wa = require "luci.tools.webadmin" +wa.cbi_add_networks(o) local mac_t = {} sys.net.mac_hints(function(e, t) @@ -95,17 +95,6 @@ table.sort(mac_t, function(a,b) return false end) -local device_list = {} -device_list = sys.net.devices() -table.sort(device_list) -interface = s:option(ListValue, "interface", translate("Source Interface")) - -for k, name in ipairs(device_list) do - interface:value(name) -end - -interface:depends({ use_interface = 1 }) - ---- Source sources = s:option(DynamicList, "sources", translate("Source")) sources.description = "