diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 7d56e3d97..dc4abf0ed 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -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")) diff --git a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po index 39f4c53ad..aa317d88b 100644 --- a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po +++ b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po @@ -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 "读取缓冲区大小" diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 7e467c499..db89b47c8 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -284,12 +284,20 @@ local hysteria = { 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 { - listen = "0.0.0.0:" .. tonumber(socks_port), - disable_udp = false + 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,