parent
dca004f3ed
commit
5a3f374fd5
@ -151,8 +151,26 @@ o = s:option(Value, _n("reality_dest"), translate("Dest"))
|
||||
o.default = "google.com:443"
|
||||
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 })
|
||||
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.default = "h2,http/1.1"
|
||||
|
@ -536,9 +536,7 @@ function gen_config_server(node)
|
||||
config.inbounds[1].streamSettings.realitySettings = {
|
||||
show = false,
|
||||
dest = node.reality_dest,
|
||||
serverNames = {
|
||||
node.reality_serverNames
|
||||
},
|
||||
serverNames = node.reality_serverNames or {},
|
||||
privateKey = node.reality_private_key,
|
||||
shortIds = node.reality_shortId or ""
|
||||
} or nil
|
||||
|
Loading…
Reference in New Issue
Block a user