luci-app-passwall: sync upstream

last commit: 6dcf51f3a2
This commit is contained in:
gitea-action 2025-01-24 23:30:19 +08:00
parent dca004f3ed
commit 5a3f374fd5
2 changed files with 20 additions and 4 deletions

View File

@ -151,8 +151,26 @@ o = s:option(Value, _n("reality_dest"), translate("Dest"))
o.default = "google.com:443" o.default = "google.com:443"
o:depends({ [_n("reality")] = true }) o:depends({ [_n("reality")] = true })
o = s:option(Value, _n("reality_serverNames"), translate("serverNames")) o = s:option(DynamicList, _n("reality_serverNames"), translate("serverNames"))
o:depends({ [_n("reality")] = true }) o:depends({ [_n("reality")] = true })
function o.write(self, section, value)
local t = {}
local t2 = {}
if type(value) == "table" then
local x
for _, x in ipairs(value) do
if x and #x > 0 then
if not t2[x] then
t2[x] = x
t[#t+1] = x
end
end
end
else
t = { value }
end
return DynamicList.write(self, section, t)
end
o = s:option(ListValue, _n("alpn"), translate("alpn")) o = s:option(ListValue, _n("alpn"), translate("alpn"))
o.default = "h2,http/1.1" o.default = "h2,http/1.1"

View File

@ -536,9 +536,7 @@ function gen_config_server(node)
config.inbounds[1].streamSettings.realitySettings = { config.inbounds[1].streamSettings.realitySettings = {
show = false, show = false,
dest = node.reality_dest, dest = node.reality_dest,
serverNames = { serverNames = node.reality_serverNames or {},
node.reality_serverNames
},
privateKey = node.reality_private_key, privateKey = node.reality_private_key,
shortIds = node.reality_shortId or "" shortIds = node.reality_shortId or ""
} or nil } or nil