fix hysteria minor errors

This commit is contained in:
AmberisMyShiba 2023-10-09 11:01:14 +08:00 committed by sbwml
parent 2d705c1bd9
commit 9a4623ab87
3 changed files with 35 additions and 16 deletions

View File

@ -328,7 +328,7 @@ o = s:option(Value, "hy2_auth", translate("Users Authentication"))
o:depends("type", "hysteria")
o.rmempty = false
o = s:option(ListValue, "hysteria_protocol", translate("Protocol"))
o = s:option(ListValue, "transport_protocol", translate("Protocol"))
o:depends("type", "hysteria")
o:value("udp", translate("udp"))
o.default = "udp"
@ -339,6 +339,12 @@ o:depends("type", "hysteria")
o.rmempty = true
o.default = "0"
o = s:option(Value, "hopinterval", translate("Port Hopping Interval(Unit:Second)"))
o:depends({type = "hysteria", port_hopping = 1})
o.datatype = "uinteger"
o.rmempty = true
o.default = "30"
o = s:option(Value, "port_range", translate("Port Range"))
o:depends({type = "hysteria", port_hopping = 1})
o.rmempty = false
@ -396,12 +402,14 @@ o.default = "20971520"
o = s:option(Value, "maxidletimeout", translate("QUIC maxIdleTimeout(Unit:second)"))
o:depends({type = "hysteria",flag_quicparam = "1"})
o.rmempty = true
o.default = "30s"
o.datatype = "uinteger"
o.default = "30"
o = s:option(Value, "keepaliveperiod", translate("The keep-alive period.(Unit:second)"))
o:depends({type = "hysteria",flag_quicparam = "1"})
o.rmempty = true
o.default = "10s"
o.datatype = "uinteger"
o.default = "10"
o = s:option(Flag, "disablepathmtudiscovery", translate("Disable Path MTU discovery"))
o:depends({type = "hysteria",flag_quicparam = "1"})
@ -767,14 +775,14 @@ o:depends("transport", "kcp")
o.default = 50
o.rmempty = true
o = s:option(Value, "uplink_capacity", translate("Uplink Capacity"))
o = s:option(Value, "uplink_capacity", translate("Uplink Capacity(Default:Mbps)"))
o.datatype = "uinteger"
o:depends("transport", "kcp")
o:depends("type", "hysteria")
o.default = 5
o.rmempty = true
o = s:option(Value, "downlink_capacity", translate("Downlink Capacity"))
o = s:option(Value, "downlink_capacity", translate("Downlink Capacity(Default:Mbps)"))
o.datatype = "uinteger"
o:depends("transport", "kcp")
o:depends("type", "hysteria")
@ -832,6 +840,7 @@ o:depends({type = "v2ray", v2ray_protocol = "shadowsocks", reality = false})
o:depends({type = "v2ray", v2ray_protocol = "socks", socks_ver = "5", reality = false})
o:depends({type = "v2ray", v2ray_protocol = "http", reality = false})
o:depends("type", "trojan")
o:depends("type", "hysteria")
-- [[ TLS部分 ]] --
o = s:option(Flag, "tls_sessionTicket", translate("Session Ticket"))
@ -887,7 +896,6 @@ o = s:option(Value, "tls_host", translate("TLS Host"))
o.datatype = "hostname"
o:depends("tls", true)
o:depends("reality", true)
o:depends("type", "hysteria")
o.rmempty = true
o = s:option(DynamicList, "tls_alpn", translate("TLS ALPN"))

View File

@ -118,6 +118,9 @@ msgstr "启用端口跃迁"
msgid "Port Range"
msgstr "端口范围值"
msgid "Port Hopping Interval(Unit:Second)"
msgstr "端口跃迁间隔(单位:秒)"
msgid "Enable Lazy Mode"
msgstr "启用懒狗模式"
@ -870,11 +873,11 @@ msgstr "最大传输单元"
msgid "TTI"
msgstr "传输时间间隔"
msgid "Uplink Capacity"
msgstr "上行链路容量"
msgid "Uplink Capacity(Default:Mbps)"
msgstr "上行链路容量默认Mbps"
msgid "Downlink Capacity"
msgstr "下行链路容量"
msgid "Downlink Capacity(Default:Mbps)"
msgstr "下行链路容量默认Mbps"
msgid "Read Buffer Size"
msgstr "读取缓冲区大小"

View File

@ -287,9 +287,17 @@ local hysteria = {
listen = "0.0.0.0:" .. tonumber(socks_port),
disable_udp = false
} or nil,
--[[ tcpTProxy = (proto:find("tcp") and local_port ~= "0") and {
transport = {
type = server.transport_protocol,
udp = {
hopInterval = tonumber(server.hopinterval) and tonumber(server.hopinterval) .. "s" or nil
}
},
--[[
tcpTProxy = (proto:find("tcp") and local_port ~= "0") and {
listen = "0.0.0.0:" .. tonumber(local_port)
} or nil,]]
} or nil,
]]
tcpRedirect = (proto:find("tcp") and local_port ~= "0") and {
listen = "0.0.0.0:" .. tonumber(local_port)
} or nil,
@ -305,8 +313,8 @@ local hysteria = {
maxStreamReceiveWindow = (server.maxstreamseceivewindow and server.maxstreamseceivewindow or nil),
initConnReceiveWindow = (server.initconnreceivewindow and server.initconnreceivewindow or nil),
maxConnReceiveWindow = (server.maxconnreceivewindow and server.maxconnreceivewindow or nil),
maxIdleTimeout = (server.maxincomingstreams and server.maxincomingstreams or nil),
keepAlivePeriod = (server.maxincomingstreams and server.keepaliveperiod or nil),
maxIdleTimeout = (tonumber(server.maxidletimeout) and tonumber(server.maxidletimeout) .. "s" or nil),
keepAlivePeriod = (tonumber(server.keepaliveperiod) and tonumber(server.keepaliveperiod) .. "s" or nil),
disable_mtu_discovery = (server.disablepathmtudiscovery == "1") and true or false
} or nil,
auth = server.hy2_auth,