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

support Hysteria Port hopping features #1247

Merged
merged 4 commits into from
Sep 4, 2023
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
14 changes: 12 additions & 2 deletions luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ o:depends("type", "socks5")

o = s:option(Value, "server_port", translate("Server Port"))
o.datatype = "port"
o.rmempty = false
o.rmempty = ({port_hopping=0 and false or true})
o:depends("type", "ssr")
o:depends("type", "ss")
o:depends("type", "v2ray")
o:depends("type", "trojan")
o:depends("type", "naiveproxy")
o:depends("type", "hysteria")
o:depends({type="hysteria",port_hopping=0})
o:depends("type", "tuic")
o:depends("type", "socks5")

Expand Down Expand Up @@ -308,6 +308,16 @@ o = s:option(Value, "obfs_param", translate("Obfs param (optional)"))
o:depends("type", "ssr")

-- [[ Hysteria ]]--
o = s:option(Flag, "port_hopping", translate("Enable Port Hopping"))
o:depends("type", "hysteria")
o.rmempty = true
o.default = "0"

o = s:option(Value, "port_range", translate("Port Range"))
o:depends({type = "hysteria", port_hopping = "1"})
o.datatype = "portrange"
o.rmempty = true

o = s:option(ListValue, "hysteria_protocol", translate("Protocol"))
o:depends("type", "hysteria")
o:value("udp", translate("udp"))
Expand Down
6 changes: 6 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 @@ -106,6 +106,12 @@ msgstr "混淆参数(可选)"
msgid "Authentication type"
msgstr "验证类型"

msgid "Enable Port Hopping"
msgstr "启用端口跃迁"

msgid "Port Range"
msgstr "端口范围值"

msgid "Authentication payload"
msgstr "验证载荷"

Expand Down