From 421c6fa3f03f183d04a0325613706b830a71e685 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Wed, 2 Dec 2020 09:25:21 +0800 Subject: [PATCH] luci-app-ssr-plus: fix v2ray/xray config file generation --- .../root/usr/share/shadowsocksr/genv2config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua index ec19fca71f..2852c75a25 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua @@ -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)) \ No newline at end of file +print(json.stringify(Xray, 1))