Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ o.rmempty = true

-- Tuic settings for the local inbound socks5 server
o = s:option(Flag, "tuic_dual_stack", translate("Dual-stack Listening Socket"))
o.description = translate("If this option is not set, the socket behavior is platform dependent.")
o:depends("type", "tuic")
o.default = "0"
o.rmempty = true
Expand Down Expand Up @@ -941,7 +942,8 @@ o:depends("reality", true)
o.rmempty = true

o = s:option(DynamicList, "tls_alpn", translate("TLS ALPN"))
o:depends({type = "tuic", tls = true})
o:depends("type", "tuic")
o.default = "h3"
o.rmempty = true

-- [[ allowInsecure ]]--
Expand Down
3 changes: 3 additions & 0 deletions luci-app-ssr-plus/po/zh-cn/ssr-plus.po
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,9 @@ msgstr "接收窗口(无需确认即可接收的最大字节数:默认8Mb)
msgid "Dual-stack Listening Socket"
msgstr "双栈Socket监听"

msgid "If this option is not set, the socket behavior is platform dependent."
msgstr "如果未设置此选项,则套接字行为依赖于平台。"

msgid "Maximum packet size the socks5 server can receive from external"
msgstr "socks5服务器可以从外部接收的最大数据包大小(单位:字节)"

Expand Down
4 changes: 2 additions & 2 deletions luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
Loading