From 9f4ff1bb2771f1583ebd274f89a9bbb977dbda91 Mon Sep 17 00:00:00 2001 From: action Date: Sun, 16 Aug 2026 16:21:47 +0800 Subject: [PATCH] update 2026-08-16 16:21:47 --- dae/Makefile | 2 +- luci-app-passwall2/Makefile | 9 +--- .../luasrc/controller/passwall2.lua | 13 ++++-- .../model/cbi/passwall2/client/global.lua | 3 ++ .../client/node_subscribe_config.lua | 4 +- .../type/{2_sing-box.lua => 1_sing-box.lua} | 0 .../client/type/{1_xray.lua => 2_xray.lua} | 0 .../type/{4_ss-rust.lua => 3_ss-rust.lua} | 0 .../client/type/{5_ssr.lua => 4_ssr.lua} | 0 .../type/{3_hysteria2.lua => 5_hysteria2.lua} | 0 .../cbi/passwall2/client/type/6_naive.lua | 33 --------------- .../type/{2_sing-box.lua => 1_sing-box.lua} | 0 .../server/type/{1_xray.lua => 2_xray.lua} | 0 .../type/{4_ss-rust.lua => 3_ss-rust.lua} | 0 .../server/type/{5_ssr.lua => 4_ssr.lua} | 0 .../type/{3_hysteria2.lua => 5_hysteria2.lua} | 0 luci-app-passwall2/luasrc/passwall2/api.lua | 29 +++++++++++-- .../luasrc/passwall2/util_naiveproxy.lua | 42 ------------------- .../root/usr/share/passwall2/app.sh | 9 ---- .../root/etc/init.d/shadowsocksr | 30 +++++++++---- luci-app-ssr-plus/root/usr/bin/ssr-rules | 19 ++++++--- 21 files changed, 78 insertions(+), 115 deletions(-) rename luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/{2_sing-box.lua => 1_sing-box.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/{1_xray.lua => 2_xray.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/{4_ss-rust.lua => 3_ss-rust.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/{5_ssr.lua => 4_ssr.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/{3_hysteria2.lua => 5_hysteria2.lua} (100%) delete mode 100644 luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/6_naive.lua rename luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/{2_sing-box.lua => 1_sing-box.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/{1_xray.lua => 2_xray.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/{4_ss-rust.lua => 3_ss-rust.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/{5_ssr.lua => 4_ssr.lua} (100%) rename luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/{3_hysteria2.lua => 5_hysteria2.lua} (100%) delete mode 100644 luci-app-passwall2/luasrc/passwall2/util_naiveproxy.lua diff --git a/dae/Makefile b/dae/Makefile index ff593683..e80abfb9 100644 --- a/dae/Makefile +++ b/dae/Makefile @@ -10,7 +10,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=51710757f8dc8b08d7dc008864b4e9c740dcf7a4 +PKG_SOURCE_VERSION:=7666cccc681ad21b66156f95a8db627bcbf2b244 PKG_SOURCE_URL:=https://github.com/olicesx/dae.git PKG_MIRROR_HASH:=skip diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 3c303338..709ce2bf 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 -PKG_VERSION:=26.8.14 +PKG_VERSION:=26.8.16 PKG_RELEASE:=1 PKG_PO_VERSION:=$(PKG_VERSION) @@ -15,7 +15,6 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client \ @@ -91,12 +90,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria select PACKAGE_hysteria default n -config PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy - bool "Include NaiveProxy" - depends on !(arc||armeb||loongarch64||mips||mips64||powerpc||TARGET_gemini) - select PACKAGE_naiveproxy - default n - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client bool "Include Shadowsocks Rust Client" depends on !i386 diff --git a/luci-app-passwall2/luasrc/controller/passwall2.lua b/luci-app-passwall2/luasrc/controller/passwall2.lua index f4b2fbf8..c19167a4 100644 --- a/luci-app-passwall2/luasrc/controller/passwall2.lua +++ b/luci-app-passwall2/luasrc/controller/passwall2.lua @@ -467,14 +467,13 @@ end function delete_select_nodes() local ids = http.formvalue("ids") local redirect = http.formvalue("redirect") + local ids_t = {} string.gsub(ids, '[^' .. "," .. ']+', function(w) + ids_t[#ids_t + 1] = w if (uci_get("@global[0]", "node") or "") == w then uci_del('@global[0]', "node") end uci_foreach("socks", function(t) - if t["node"] == w then - uci_del(t[".name"]) - end local changed = false local auto_switch_node_list = uci_get(t[".name"], "autoswitch_backup_node") or {} for i = #auto_switch_node_list, 1, -1 do @@ -486,6 +485,14 @@ function delete_select_nodes() if changed then uci_set(t[".name"], "autoswitch_backup_node", auto_switch_node_list) end + if t["node"] == w then + local new_node = api.get_random_normal_node(ids_t) + if new_node then + uci_set(t[".name"], "node", new_node[".name"]) + else + uci_set(t[".name"], "enabled", "0") + end + end end) uci_foreach("haproxy_config", function(t) if t["lbss"] == w then diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua index a7f88004..3173579a 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua @@ -308,6 +308,7 @@ o.rmempty = false s2 = m:section(TypedSection, "socks", translate("Socks Config")) s2.template = "cbi/tblsection" +s2.sortable = true s2.anonymous = true s2.addremove = true s2.extedit = api.url("socks_config", "%s") @@ -383,4 +384,6 @@ end m:appendTemplate("/global/footer", {shunt_list = api.jsonc.stringify(shunt_list)}) +m:appendTemplate("/cbi/sortable", {sectiontype = s2.sectiontype}) + return api.return_map(m) diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_subscribe_config.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_subscribe_config.lua index aba243cc..a748281d 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_subscribe_config.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/node_subscribe_config.lua @@ -92,7 +92,7 @@ o.write = function(self, section, value) if old ~= value then m:foreach("nodes", function(e) if e["group"] and e["group"]:lower() == old:lower() then - self:set(e[".name"], "group", value) + self.map:set(e[".name"], "group", value) end if e["protocol"] and (e["protocol"] == "_balancing" or e["protocol"] == "_urltest") and e["node_group"] then local gs = "" @@ -104,7 +104,7 @@ o.write = function(self, section, value) end end gs = api.trim(gs) - self:set(e[".name"], "node_group", gs) + self.map:set(e[".name"], "node_group", gs) end end) end diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/2_sing-box.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_sing-box.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/2_sing-box.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_sing-box.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_xray.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/2_xray.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_xray.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/2_xray.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/4_ss-rust.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/3_ss-rust.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/4_ss-rust.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/3_ss-rust.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/5_ssr.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/4_ssr.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/5_ssr.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/4_ssr.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/3_hysteria2.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/5_hysteria2.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/3_hysteria2.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/5_hysteria2.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/6_naive.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/6_naive.lua deleted file mode 100644 index 4d5c55ac..00000000 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/6_naive.lua +++ /dev/null @@ -1,33 +0,0 @@ -if not api.is_finded("naive") then - return -end - --- [[ Naive ]] -local m, s1 = ... -local type_name = "Naiveproxy" - -s1.fields["type"]:value(type_name, "NaiveProxy") - -if s1.val["type"] ~= type_name then - return -end - -local s = NamedSection(m, arg[1], "server") -s.type_name = type_name -s.option_prefix = "naive_" - -o = s:option(ListValue, "protocol", translate("Protocol")) -o:value("https", translate("HTTPS")) -o:value("quic", translate("QUIC")) - -o = s:option(Value, "address", translate("Address (Support Domain Name)")) - -o = s:option(Value, "port", translate("Port")) -o.datatype = "port" - -o = s:option(Value, "username", translate("Username")) - -o = s:option(Value, "password", translate("Password")) -o.password = true - -api.luci_types(s1, s) \ No newline at end of file diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/2_sing-box.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_sing-box.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/2_sing-box.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_sing-box.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_xray.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/2_xray.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_xray.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/2_xray.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/4_ss-rust.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/3_ss-rust.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/4_ss-rust.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/3_ss-rust.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/5_ssr.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/4_ssr.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/5_ssr.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/4_ssr.lua diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/3_hysteria2.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/5_hysteria2.lua similarity index 100% rename from luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/3_hysteria2.lua rename to luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/5_hysteria2.lua diff --git a/luci-app-passwall2/luasrc/passwall2/api.lua b/luci-app-passwall2/luasrc/passwall2/api.lua index 779bce87..25e68be2 100644 --- a/luci-app-passwall2/luasrc/passwall2/api.lua +++ b/luci-app-passwall2/luasrc/passwall2/api.lua @@ -598,7 +598,7 @@ function get_valid_nodes() local nodes = {} local default_nodes = {} local other_nodes = {} - uci:foreach(c_config, "nodes", function(e) + uci_foreach_c("nodes", function(e) e.id = e[".name"] if e.type and e.remarks then local type_name = e.type @@ -671,8 +671,8 @@ function get_node_list() socks_list = {}, normal_list = {}, } - uci:foreach(c_config, "socks", function(s) - if s.enabled == "1" and s.node then + uci_foreach_c("socks", function(s) + if s.node then node_list.socks_list[#node_list.socks_list + 1] = { id = s[".name"], remark = i18n.translate("Socks Config") .. " [" .. s.port .. i18n.translate("Port") .. "]", @@ -760,6 +760,29 @@ function get_full_node_remarks(n) return remarks end +function get_random_normal_node(exclude_id) + local exclude_id_lookup = {} + if type(exclude_id) == "table" then + for i, v in ipairs(exclude_id) do + exclude_id_lookup[v] = true + end + elseif type(exclude_id) == "string" then + exclude_id_lookup[exclude_id] = true + end + local normal_list = {} + for k, e in ipairs(get_valid_nodes()) do + if e.node_type == "normal" and not exclude_id_lookup[e[".name"]] then + normal_list[#normal_list + 1] = e + end + end + if #normal_list > 0 then + math.randomseed(os.time()) + local num = math.random(1, #normal_list) + return normal_list[num] + end + return nil +end + function gen_uuid() local uuid = sys.exec("echo -n $(cat /proc/sys/kernel/random/uuid)") return uuid diff --git a/luci-app-passwall2/luasrc/passwall2/util_naiveproxy.lua b/luci-app-passwall2/luasrc/passwall2/util_naiveproxy.lua deleted file mode 100644 index c4f62638..00000000 --- a/luci-app-passwall2/luasrc/passwall2/util_naiveproxy.lua +++ /dev/null @@ -1,42 +0,0 @@ -module("luci.passwall2.util_navieproxy", package.seeall) -local api = require "luci.passwall2.api" -local jsonc = api.jsonc - -function gen_config(var) - local node_id = var["node"] - if not node_id then - print("node Cannot be empty!") - return - end - local node = api.uci_get_c(node_id) - local run_type = var["run_type"] - local local_addr = var["local_addr"] - local local_port = var["local_port"] - local server_host = var["server_host"] or (node.address or ""):lower() - local server_port = var["server_port"] or node.port - - if api.is_ipv6(server_host) then - server_host = api.get_ipv6_full(server_host) - end - local server = server_host .. ":" .. server_port - - local config = { - listen = run_type .. "://" .. local_addr .. ":" .. local_port, - proxy = node.protocol .. "://" .. node.username .. ":" .. node.password .. "@" .. server - } - - return jsonc.stringify(config, 1) -end - -_G.gen_config = gen_config - -if arg[1] then - local func =_G[arg[1]] - if func then - local var = nil - if arg[2] then - var = jsonc.parse(arg[2]) - end - print(func(var)) - end -end diff --git a/luci-app-passwall2/root/usr/share/passwall2/app.sh b/luci-app-passwall2/root/usr/share/passwall2/app.sh index 49ae8c66..81baf88e 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/app.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/app.sh @@ -12,7 +12,6 @@ LUA_UTIL_PATH=/usr/lib/lua/luci/passwall2 UTIL_SINGBOX=$LUA_UTIL_PATH/util_sing-box.lua UTIL_SS=$LUA_UTIL_PATH/util_shadowsocks.lua UTIL_XRAY=$LUA_UTIL_PATH/util_xray.lua -UTIL_NAIVE=$LUA_UTIL_PATH/util_naiveproxy.lua UTIL_HYSTERIA2=$LUA_UTIL_PATH/util_hysteria2.lua SINGBOX_BIN=$(first_type $(config_t_get global_app sing_box_file) sing-box) XRAY_BIN=$(first_type $(config_t_get global_app xray_file) xray) @@ -455,14 +454,6 @@ run_socks() { lua $UTIL_XRAY gen_config "${_json_arg}" > $config_file [ -z "$no_run" ] && ln_run ${QUEUE_RUN} "$XRAY_BIN" "xray" $log_file run -c "$config_file" ;; - naiveproxy) - json_add_string "local_addr" "${bind}" - json_add_string "local_port" "${socks_port}" - json_add_string "run_type" "socks" - local _json_arg="$(json_dump)" - lua $UTIL_NAIVE gen_config "${_json_arg}" > $config_file - [ -z "$no_run" ] && ln_run ${QUEUE_RUN} "$(first_type naive)" naive $log_file "$config_file" - ;; ssr) json_add_string "local_addr" "${bind}" json_add_string "local_port" "${socks_port}" diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index cedae0be..41df5c1c 100755 --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -965,20 +965,27 @@ start_socks5_udp_with_ipt2socks() { local local_port="$2" local threads="$3" local ipt2socks_bin - local auth_opts="" + local server_ip local _i ipt2socks_bin="$(first_type ipt2socks)" + server_ip="$(get_host_ip "$sid")" [ -x "$ipt2socks_bin" ] || return 1 + [ -n "$server_ip" ] || { + echolog "UDP TPROXY Relay:Socks5 无法解析服务器地址。" + return 1 + } + set -- if [ "$(uci_get_by_name "$sid" auth_enable 0)" = "1" ]; then - auth_opts="-a $(uci_get_by_name "$sid" username) -k $(uci_get_by_name "$sid" password)" + set -- -a "$(uci_get_by_name "$sid" username)" \ + -k "$(uci_get_by_name "$sid" password)" fi for _i in $(seq 1 "$threads"); do ln_start_bin "$ipt2socks_bin" ipt2socks -U -r -b 0.0.0.0 -4 \ - -s "$(uci_get_by_name "$sid" server)" \ + -s "$server_ip" \ -p "$(uci_get_by_name "$sid" server_port)" \ - -l "$local_port" "$auth_opts" + -l "$local_port" "$@" done echolog "UDP TPROXY Relay:Socks5 via IPT2Socks $threads Threads Started!" return 0 @@ -989,21 +996,28 @@ start_socks5_redir_with_ipt2socks() { local local_port="$2" local threads="$3" local ipt2socks_bin - local auth_opts="" + local server_ip local _i ipt2socks_bin="$(first_type ipt2socks)" + server_ip="$(get_host_ip "$sid")" [ -x "$ipt2socks_bin" ] || return 1 + [ -n "$server_ip" ] || { + echolog "Main node:Socks5 无法解析服务器地址。" + return 1 + } + set -- if [ "$(uci_get_by_name "$sid" auth_enable 0)" = "1" ]; then - auth_opts="-a $(uci_get_by_name "$sid" username) -k $(uci_get_by_name "$sid" password)" + set -- -a "$(uci_get_by_name "$sid" username)" \ + -k "$(uci_get_by_name "$sid" password)" fi for _i in $(seq 1 "$threads"); do ln_start_bin "$ipt2socks_bin" ipt2socks \ -T -R -r -b 0.0.0.0 -4 \ - -s "$(uci_get_by_name "$sid" server)" \ + -s "$server_ip" \ -p "$(uci_get_by_name "$sid" server_port)" \ - -l "$local_port" "$auth_opts" + -l "$local_port" "$@" done echolog "Main node:Socks5 via IPT2Socks $threads Threads Started!" return 0 diff --git a/luci-app-ssr-plus/root/usr/bin/ssr-rules b/luci-app-ssr-plus/root/usr/bin/ssr-rules index 8e52399e..801077ba 100755 --- a/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -1262,6 +1262,13 @@ compare_rules() { return 0 # No update needed } +append_nftables_comment() { + local name="$1" + local value + value=$(printf '%s' "$2" | tr '\r\n' ' ') + printf '# %s: %s\n' "$name" "$value" >> "$NFTABLES_RULES_FILE" +} + # Auto-update persistence rules persist_nftables_rules() { if [ "$USE_NFT" != "1" ]; then @@ -1296,12 +1303,12 @@ persist_nftables_rules() { echo "# Auto-updated: $(date)" >> "$NFTABLES_RULES_FILE" echo "# Runmode: ${RUNMODE:-router}" >> "$NFTABLES_RULES_FILE" echo "# Server: $server, Port: $local_port" >> "$NFTABLES_RULES_FILE" - echo "# WAN_BP_IP: $WAN_BP_IP" >> "$NFTABLES_RULES_FILE" - echo "# LAN_AC_IP: $LAN_AC_IP" >> "$NFTABLES_RULES_FILE" - echo "# LAN_BP_IP: $LAN_BP_IP" >> "$NFTABLES_RULES_FILE" - echo "# WAN_FW_IP: $WAN_FW_IP" >> "$NFTABLES_RULES_FILE" - echo "# LAN_FP_IP: $LAN_FP_IP" >> "$NFTABLES_RULES_FILE" - echo "# LAN_GM_IP: $LAN_GM_IP" >> "$NFTABLES_RULES_FILE" + append_nftables_comment "WAN_BP_IP" "$WAN_BP_IP" + append_nftables_comment "LAN_AC_IP" "$LAN_AC_IP" + append_nftables_comment "LAN_BP_IP" "$LAN_BP_IP" + append_nftables_comment "WAN_FW_IP" "$WAN_FW_IP" + append_nftables_comment "LAN_FP_IP" "$LAN_FP_IP" + append_nftables_comment "LAN_GM_IP" "$LAN_GM_IP" echo "" >> "$NFTABLES_RULES_FILE" local HAS_RULES=0