diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 45f710aba..eb0e6e369 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -55,15 +55,6 @@ function trojan_shadowsocks() if server.v2ray_protocol == "shadowsocksr" then server.v2ray_protocol = "shadowsocks" - --[[ elseif (server.v2ray_protocol == "shadowsocks") and (server.mux ~= "1") and (not (outbound_settings.plugin or server.transport ~= "tcp" or server.tls or server.xtls)) then - server.v2ray_protocol = "shadowsocks_sing" - outbound_settings = outbound_settings.servers[1] - elseif (server.v2ray_protocol == "trojan") and (server.tls and server.mux ~= "1") and (not (server.transport ~= "tcp" or server.xtls)) then - server.v2ray_protocol = "trojan_sing" - outbound_settings = outbound_settings.servers[1] - outbound_settings.serverName = server.tls_host - outbound_settings.insecure = (server.insecure == "1") and true or false - ]] end end function socks_http() @@ -161,7 +152,7 @@ local Xray = { protocol = server.v2ray_protocol, settings = outbound_settings, -- 底层传输配置 - streamSettings = (server.v2ray_protocol and server.v2ray_protocol:sub(-#"_sing") ~= "_sing") and { + streamSettings = { network = server.transport or "tcp", security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil, tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and { @@ -231,7 +222,7 @@ local Xray = { permit_without_stream = (server.permit_without_stream == "1") and true or nil, initial_windows_size = tonumber(server.initial_windows_size) or nil } or nil - } or nil, + }, mux = (server.mux == "1" and server.xtls ~= "1" and server.transport ~= "grpc") and { -- mux enabled = true,