From f0e7dcefc72e8e213e77e12b4a3877928ee64a39 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Thu, 16 Jan 2025 22:00:20 +0800 Subject: [PATCH] luci-app-passwall: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall/commit/c89f1a265b0e5a4c659ad0adabbf1bd907ba8a00 --- .../luasrc/model/cbi/passwall/client/node_subscribe.lua | 2 +- .../model/cbi/passwall/client/node_subscribe_config.lua | 2 +- .../luasrc/model/cbi/passwall/client/other.lua | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua index eee65a3b0..24173c724 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua @@ -1,5 +1,5 @@ local api = require "luci.passwall.api" -local uci = require "luci.model.uci".cursor() +local uci = api.uci local appname = "passwall" local has_ss = api.is_finded("ss-redir") local has_ss_rust = api.is_finded("sslocal") diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe_config.lua index fe166cb32..8caa1ffb3 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe_config.lua @@ -1,5 +1,5 @@ local api = require "luci.passwall.api" -local uci = require "luci.model.uci".cursor() +local uci = api.uci local appname = "passwall" m = Map(appname) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua index 85060ad38..ff462fcdf 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua @@ -58,8 +58,7 @@ for index, value in ipairs({"stop", "start", "restart"}) do end -- [[ Forwarding Settings ]]-- -s = m:section(TypedSection, "global_forwarding", - translate("Forwarding Settings")) +s = m:section(TypedSection, "global_forwarding", translate("Forwarding Settings")) s.anonymous = true s.addremove = false @@ -124,13 +123,16 @@ if (os.execute("lsmod | grep -i REDIRECT >/dev/null") == 0 and os.execute("lsmod o:value("redirect", "REDIRECT") o:value("tproxy", "TPROXY") o:depends("ipv6_tproxy", false) + o.remove = function(self, section) + -- 禁止在隐藏时删除 + end o = s:option(ListValue, "_tcp_proxy_way", translate("TCP Proxy Way")) o.default = "tproxy" o:value("tproxy", "TPROXY") o:depends("ipv6_tproxy", true) o.write = function(self, section, value) - return self.map:set(section, "tcp_proxy_way", value) + self.map:set(section, "tcp_proxy_way", value) end if os.execute("lsmod | grep -i ip6table_mangle >/dev/null") == 0 or os.execute("lsmod | grep -i nft_tproxy >/dev/null") == 0 then @@ -219,6 +221,7 @@ if has_xray then o = s_xray_noise:option(ListValue, "type", translate("Type")) o:value("rand", "rand") o:value("str", "str") + o:value("hex", "hex") o:value("base64", "base64") o = s_xray_noise:option(Value, "packet", translate("Packet"))