luci-app-ssr-plus: allow custom fingerprints with XTLS

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-11-08 14:20:33 +08:00 committed by sbwml
parent e9565e1098
commit 23e3d49d74
2 changed files with 3 additions and 1 deletions

View File

@ -661,6 +661,7 @@ if is_finded("xray") then
o:value("safari", translate("safari"))
o:value("randomized", translate("randomized"))
o:depends({type = "v2ray", tls = true})
o:depends({type = "v2ray", xtls = true})
o.default = "disable"
end

View File

@ -161,8 +161,9 @@ local Xray = {
allowInsecure = (server.insecure == "1") and true or nil,
serverName = server.tls_host
} or nil,
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host)) and {
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
-- xtls
fingerprint = server.fingerprint,
allowInsecure = (server.insecure == "1") and true or nil,
serverName = server.tls_host,
minVersion = "1.3"