luci-app-passwall: sync upstream

last commit: c89f1a265b
This commit is contained in:
gitea-action 2025-01-16 22:00:20 +08:00
parent f1f2342208
commit f0e7dcefc7
3 changed files with 8 additions and 5 deletions

View File

@ -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")

View File

@ -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)

View File

@ -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"))