diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_hysteria.lua b/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_hysteria.lua index 8ea4f17db..7914780ef 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_hysteria.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_hysteria.lua @@ -28,6 +28,10 @@ if api.is_ipv6(server_host) then end local server = server_host .. ":" .. server_port +if (node.hysteria_hop) then + server = server .. "," .. node.hysteria_hop +end + local config = { server = server, protocol = node.protocol or "udp", @@ -43,6 +47,9 @@ local config = { retry_interval = 5, recv_window_conn = (node.hysteria_recv_window_conn) and tonumber(node.hysteria_recv_window_conn) or nil, recv_window = (node.hysteria_recv_window) and tonumber(node.hysteria_recv_window) or nil, + handshake_timeout = (node.hysteria_handshake_timeout) and tonumber(node.hysteria_handshake_timeout) or nil, + idle_timeout = (node.hysteria_idle_timeout) and tonumber(node.hysteria_idle_timeout) or nil, + hop_interval = (node.hysteria_hop_interval) and tonumber(node.hysteria_hop_interval) or nil, disable_mtu_discovery = (node.hysteria_disable_mtu_discovery) and true or false, socks5 = (local_socks_address and local_socks_port) and { listen = local_socks_address .. ":" .. local_socks_port, diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua index b4d421d84..476590933 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua @@ -284,6 +284,9 @@ port:depends({ type = "Xray", protocol = "socks" }) port:depends({ type = "Xray", protocol = "shadowsocks" }) port:depends({ type = "Xray", protocol = "trojan" }) +hysteria_hop = s:option(Value, "hysteria_hop", translate("Additional ports for hysteria hop")) +hysteria_hop:depends("type", "Hysteria") + username = s:option(Value, "username", translate("Username")) username:depends("type", "Socks") username:depends("type", "Naiveproxy") @@ -824,6 +827,15 @@ hysteria_recv_window_conn:depends("type", "Hysteria") hysteria_recv_window = s:option(Value, "hysteria_recv_window", translate("QUIC connection receive window")) hysteria_recv_window:depends("type", "Hysteria") +hysteria_handshake_timeout = s:option(Value, "hysteria_handshake_timeout", translate("Handshake Timeout")) +hysteria_handshake_timeout:depends("type", "Hysteria") + +hysteria_idle_timeout = s:option(Value, "hysteria_idle_timeout", translate("Idle Timeout")) +hysteria_idle_timeout:depends("type", "Hysteria") + +hysteria_hop_interval = s:option(Value, "hysteria_hop_interval", translate("Hop Interval")) +hysteria_hop_interval:depends("type", "Hysteria") + hysteria_disable_mtu_discovery = s:option(Flag, "hysteria_disable_mtu_discovery", translate("Disable MTU detection")) hysteria_disable_mtu_discovery:depends("type", "Hysteria") diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po index e0a858478..6c5c776ab 100644 --- a/luci-app-passwall/po/zh-cn/passwall.po +++ b/luci-app-passwall/po/zh-cn/passwall.po @@ -1314,3 +1314,15 @@ msgstr "缓冲区大小(Xray)" msgid "Buffer size for every connection (kB)" msgstr "每一个连接的缓冲区大小(kB)" + +msgid "Handshake Timeout" +msgstr "握手超时 " + +msgid "Idle Timeout" +msgstr "空闲超时 " + +msgid "Hop Interval" +msgstr "端口跳跃时间 " + +msgid "Additional ports for hysteria hop" +msgstr "端口跳跃额外端口"