parent
6c03b15817
commit
623962611b
@ -401,6 +401,10 @@ if singbox_tags:find("with_quic") then
|
||||
end
|
||||
|
||||
if singbox_tags:find("with_quic") then
|
||||
o = s:option(Value, _n("hysteria2_ports"), translate("Port hopping range"))
|
||||
o.description = translate("Format as 1000:2000 Multiple groups are separated by commas (,).")
|
||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
||||
|
||||
o = s:option(Value, _n("hysteria2_up_mbps"), translate("Max upload Mbps"))
|
||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
||||
|
||||
|
@ -383,7 +383,17 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
end
|
||||
|
||||
if node.protocol == "hysteria2" then
|
||||
local server_ports = {}
|
||||
if node.hysteria2_ports then
|
||||
for range in node.hysteria2_ports:gmatch("([^,]+)") do
|
||||
if range:match("^%d+:%d+$") then
|
||||
table.insert(server_ports, range)
|
||||
end
|
||||
end
|
||||
end
|
||||
protocol_table = {
|
||||
server_ports = next(server_ports) and server_ports or nil,
|
||||
hop_interval = next(server_ports) and "30s" or nil,
|
||||
up_mbps = (node.hysteria2_up_mbps and tonumber(node.hysteria2_up_mbps)) and tonumber(node.hysteria2_up_mbps) or nil,
|
||||
down_mbps = (node.hysteria2_down_mbps and tonumber(node.hysteria2_down_mbps)) and tonumber(node.hysteria2_down_mbps) or nil,
|
||||
obfs = {
|
||||
|
@ -1821,3 +1821,9 @@ msgstr "中断现有连接"
|
||||
|
||||
msgid "Interrupt existing connections when the selected outbound has changed."
|
||||
msgstr "当选择的出站发生变化时中断现有连接。"
|
||||
|
||||
msgid "Port hopping range"
|
||||
msgstr "端口跳跃范围"
|
||||
|
||||
msgid "Format as 1000:2000 Multiple groups are separated by commas (,)."
|
||||
msgstr "格式为:1000:2000 多组时用逗号(,)隔开。"
|
||||
|
Loading…
Reference in New Issue
Block a user