fix hysteria minor errors
This commit is contained in:
parent
2d705c1bd9
commit
9a4623ab87
@ -328,7 +328,7 @@ o = s:option(Value, "hy2_auth", translate("Users Authentication"))
|
|||||||
o:depends("type", "hysteria")
|
o:depends("type", "hysteria")
|
||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
|
|
||||||
o = s:option(ListValue, "hysteria_protocol", translate("Protocol"))
|
o = s:option(ListValue, "transport_protocol", translate("Protocol"))
|
||||||
o:depends("type", "hysteria")
|
o:depends("type", "hysteria")
|
||||||
o:value("udp", translate("udp"))
|
o:value("udp", translate("udp"))
|
||||||
o.default = "udp"
|
o.default = "udp"
|
||||||
@ -339,6 +339,12 @@ o:depends("type", "hysteria")
|
|||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o.default = "0"
|
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 = s:option(Value, "port_range", translate("Port Range"))
|
||||||
o:depends({type = "hysteria", port_hopping = 1})
|
o:depends({type = "hysteria", port_hopping = 1})
|
||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
@ -396,12 +402,14 @@ o.default = "20971520"
|
|||||||
o = s:option(Value, "maxidletimeout", translate("QUIC maxIdleTimeout(Unit:second)"))
|
o = s:option(Value, "maxidletimeout", translate("QUIC maxIdleTimeout(Unit:second)"))
|
||||||
o:depends({type = "hysteria",flag_quicparam = "1"})
|
o:depends({type = "hysteria",flag_quicparam = "1"})
|
||||||
o.rmempty = true
|
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 = s:option(Value, "keepaliveperiod", translate("The keep-alive period.(Unit:second)"))
|
||||||
o:depends({type = "hysteria",flag_quicparam = "1"})
|
o:depends({type = "hysteria",flag_quicparam = "1"})
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o.default = "10s"
|
o.datatype = "uinteger"
|
||||||
|
o.default = "10"
|
||||||
|
|
||||||
o = s:option(Flag, "disablepathmtudiscovery", translate("Disable Path MTU discovery"))
|
o = s:option(Flag, "disablepathmtudiscovery", translate("Disable Path MTU discovery"))
|
||||||
o:depends({type = "hysteria",flag_quicparam = "1"})
|
o:depends({type = "hysteria",flag_quicparam = "1"})
|
||||||
@ -767,14 +775,14 @@ o:depends("transport", "kcp")
|
|||||||
o.default = 50
|
o.default = 50
|
||||||
o.rmempty = true
|
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.datatype = "uinteger"
|
||||||
o:depends("transport", "kcp")
|
o:depends("transport", "kcp")
|
||||||
o:depends("type", "hysteria")
|
o:depends("type", "hysteria")
|
||||||
o.default = 5
|
o.default = 5
|
||||||
o.rmempty = true
|
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.datatype = "uinteger"
|
||||||
o:depends("transport", "kcp")
|
o:depends("transport", "kcp")
|
||||||
o:depends("type", "hysteria")
|
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 = "socks", socks_ver = "5", reality = false})
|
||||||
o:depends({type = "v2ray", v2ray_protocol = "http", reality = false})
|
o:depends({type = "v2ray", v2ray_protocol = "http", reality = false})
|
||||||
o:depends("type", "trojan")
|
o:depends("type", "trojan")
|
||||||
|
o:depends("type", "hysteria")
|
||||||
|
|
||||||
-- [[ TLS部分 ]] --
|
-- [[ TLS部分 ]] --
|
||||||
o = s:option(Flag, "tls_sessionTicket", translate("Session Ticket"))
|
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.datatype = "hostname"
|
||||||
o:depends("tls", true)
|
o:depends("tls", true)
|
||||||
o:depends("reality", true)
|
o:depends("reality", true)
|
||||||
o:depends("type", "hysteria")
|
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
|
|
||||||
o = s:option(DynamicList, "tls_alpn", translate("TLS ALPN"))
|
o = s:option(DynamicList, "tls_alpn", translate("TLS ALPN"))
|
||||||
|
@ -118,6 +118,9 @@ msgstr "启用端口跃迁"
|
|||||||
msgid "Port Range"
|
msgid "Port Range"
|
||||||
msgstr "端口范围值"
|
msgstr "端口范围值"
|
||||||
|
|
||||||
|
msgid "Port Hopping Interval(Unit:Second)"
|
||||||
|
msgstr "端口跃迁间隔(单位:秒)"
|
||||||
|
|
||||||
msgid "Enable Lazy Mode"
|
msgid "Enable Lazy Mode"
|
||||||
msgstr "启用懒狗模式"
|
msgstr "启用懒狗模式"
|
||||||
|
|
||||||
@ -870,11 +873,11 @@ msgstr "最大传输单元"
|
|||||||
msgid "TTI"
|
msgid "TTI"
|
||||||
msgstr "传输时间间隔"
|
msgstr "传输时间间隔"
|
||||||
|
|
||||||
msgid "Uplink Capacity"
|
msgid "Uplink Capacity(Default:Mbps)"
|
||||||
msgstr "上行链路容量"
|
msgstr "上行链路容量(默认:Mbps)"
|
||||||
|
|
||||||
msgid "Downlink Capacity"
|
msgid "Downlink Capacity(Default:Mbps)"
|
||||||
msgstr "下行链路容量"
|
msgstr "下行链路容量(默认:Mbps)"
|
||||||
|
|
||||||
msgid "Read Buffer Size"
|
msgid "Read Buffer Size"
|
||||||
msgstr "读取缓冲区大小"
|
msgstr "读取缓冲区大小"
|
||||||
|
@ -284,12 +284,20 @@ local hysteria = {
|
|||||||
down = tonumber(server.downlink_capacity) and tonumber(server.downlink_capacity) .. " mbps" or nil
|
down = tonumber(server.downlink_capacity) and tonumber(server.downlink_capacity) .. " mbps" or nil
|
||||||
},
|
},
|
||||||
socks5 = (proto:find("tcp") and tonumber(socks_port) and tonumber(socks_port) ~= 0) and {
|
socks5 = (proto:find("tcp") and tonumber(socks_port) and tonumber(socks_port) ~= 0) and {
|
||||||
listen = "0.0.0.0:" .. tonumber(socks_port),
|
listen = "0.0.0.0:" .. tonumber(socks_port),
|
||||||
disable_udp = false
|
disable_udp = false
|
||||||
} or nil,
|
} 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)
|
listen = "0.0.0.0:" .. tonumber(local_port)
|
||||||
} or nil,]]
|
} or nil,
|
||||||
|
]]
|
||||||
tcpRedirect = (proto:find("tcp") and local_port ~= "0") and {
|
tcpRedirect = (proto:find("tcp") and local_port ~= "0") and {
|
||||||
listen = "0.0.0.0:" .. tonumber(local_port)
|
listen = "0.0.0.0:" .. tonumber(local_port)
|
||||||
} or nil,
|
} or nil,
|
||||||
@ -305,8 +313,8 @@ local hysteria = {
|
|||||||
maxStreamReceiveWindow = (server.maxstreamseceivewindow and server.maxstreamseceivewindow or nil),
|
maxStreamReceiveWindow = (server.maxstreamseceivewindow and server.maxstreamseceivewindow or nil),
|
||||||
initConnReceiveWindow = (server.initconnreceivewindow and server.initconnreceivewindow or nil),
|
initConnReceiveWindow = (server.initconnreceivewindow and server.initconnreceivewindow or nil),
|
||||||
maxConnReceiveWindow = (server.maxconnreceivewindow and server.maxconnreceivewindow or nil),
|
maxConnReceiveWindow = (server.maxconnreceivewindow and server.maxconnreceivewindow or nil),
|
||||||
maxIdleTimeout = (server.maxincomingstreams and server.maxincomingstreams or nil),
|
maxIdleTimeout = (tonumber(server.maxidletimeout) and tonumber(server.maxidletimeout) .. "s" or nil),
|
||||||
keepAlivePeriod = (server.maxincomingstreams and server.keepaliveperiod or nil),
|
keepAlivePeriod = (tonumber(server.keepaliveperiod) and tonumber(server.keepaliveperiod) .. "s" or nil),
|
||||||
disable_mtu_discovery = (server.disablepathmtudiscovery == "1") and true or false
|
disable_mtu_discovery = (server.disablepathmtudiscovery == "1") and true or false
|
||||||
} or nil,
|
} or nil,
|
||||||
auth = server.hy2_auth,
|
auth = server.hy2_auth,
|
||||||
|
Loading…
Reference in New Issue
Block a user