luci-app-ssr-plus: fix generate invalid hysteria socks config

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-07-18 12:49:01 +08:00 committed by sbwml
parent d2604cf8d9
commit c4e98e51e5

View File

@ -282,7 +282,7 @@ local hysteria = {
protocol = server.hysteria_protocol, protocol = server.hysteria_protocol,
up_mbps = tonumber(server.uplink_capacity), up_mbps = tonumber(server.uplink_capacity),
down_mbps = tonumber(server.downlink_capacity), down_mbps = tonumber(server.downlink_capacity),
socks5 = (proto:find("tcp") and tonumber(socks_port) and tonumber(socks_port) ~= "0") and { socks5 = (proto:find("tcp") and tonumber(socks_port) and tonumber(socks_port) ~= 0) and {
listen = "0.0.0.0:" .. tonumber(socks_port), listen = "0.0.0.0:" .. tonumber(socks_port),
timeout = 300, timeout = 300,
disable_udp = false disable_udp = false