Explorar o código

luci-app-ssr-plus: Fix 'TUIC' does not run or cannot connect.

1、If the listening socket is not set to dual-stack, the socket behavior depends on the platform.
2、Settings for the local inbound socks5 server should be set to [::] for proper running after the dual-stack configuration.
zxlhhyccc hai 1 ano
pai
achega
6515bbbd0d

+ 2 - 2
luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua

@@ -476,8 +476,8 @@ local tuic = {
 			receive_window = tonumber(server.receive_window)
 		},
 		["local"] = {
-			server = tonumber(socks_port) and (server.tuic_dual_stack == "1" and "[::1]:" or "127.0.0.1:")  .. (socks_port == "0" and local_port or tonumber(socks_port)),
-			dual_stack = (server.tuic_dual_stack == "1") and true or false,
+			server = tonumber(socks_port) and "[::]:" .. (socks_port == "0" and local_port or tonumber(socks_port)),
+			dual_stack = (server.tuic_dual_stack == "1") and true  or nil,
 			max_packet_size = tonumber(server.tuic_max_package_size)
 		}
 }