From b7ca0c23d9ae47f96f44035b0d97796a2bb584d0 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Thu, 21 Nov 2024 19:30:29 +0800 Subject: [PATCH] luci-app-passwall: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall/commit/7e403fb3c17781dbd192d1e5dcd579e332c33134 --- .../model/cbi/passwall/client/acl_config.lua | 19 ++---- .../root/usr/share/passwall/app.sh | 23 +++---- .../root/usr/share/passwall/iptables.sh | 67 +++++++++++------- .../root/usr/share/passwall/nftables.sh | 68 +++++++++++-------- 4 files changed, 94 insertions(+), 83 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua index d1beff4f1..e4b13e107 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua @@ -54,9 +54,10 @@ o = s:option(Value, "remarks", translate("Remarks")) o.default = arg[1] o.rmempty = true -o = s:option(Flag, "use_interface", translate("Use Interface With ACLs")) -o.default = 0 -o.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) @@ -78,17 +79,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 = "