luci-app-ssr-plus: fix v2ray/xray config file generation

This commit is contained in:
Mattraks 2020-12-02 09:25:21 +08:00 committed by CN_SZTL
parent 0a9ce83a9c
commit 421c6fa3f0
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -57,7 +57,7 @@ outbound = {
-- 底层传输配置
streamSettings = {
network = server.transport,
security = (server.tls == '1') and (server.xtls == '1') and "xtls" or "tls" or "none",
security = (server.tls == '1') and ((server.xtls == '1') and "xtls" or "tls") or "none",
tlsSettings = (server.tls == '1') and {allowInsecure = (server.insecure ~= "0") and true or false,serverName=server.tls_host,} or nil,
xtlsSettings = (server.xtls == '1') and {allowInsecure = (server.insecure ~= "0") and true or false,serverName=server.tls_host,} or nil,
tcpSettings = (server.transport == "tcp") and {
@ -116,4 +116,4 @@ outboundDetour = {
}
}
}
print(json.stringify(Xray, 1))
print(json.stringify(Xray, 1))