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 caf24284141..e06e4f92ebf 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 @@ -218,7 +218,7 @@ o:depends("type", "ss") o:depends("type", "v2ray") o:depends("type", "trojan") o:depends("type", "naiveproxy") -o:depends({type = "hysteria",port_hopping = false}) +o:depends("type", "hysteria") o:depends("type", "tuic") o:depends("type", "shadowtls") o:depends("type", "socks5") @@ -341,7 +341,7 @@ o.default = "30" o = s:option(Value, "port_range", translate("Port Range")) o:depends({type = "hysteria", port_hopping = true}) -o.rmempty = false +o.rmempty = true o = s:option(Flag, "lazy_mode", translate("Enable Lazy Mode")) o:depends("type", "hysteria") 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 a4fdd4cb506..5d7f5fbfb54 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 @@ -285,7 +285,7 @@ local ss = { reuse_port = true } local hysteria = { - server = server.server_port and (server.server .. ":" .. server.server_port) or (server.server .. ":" .. server.port_range), + server = (server.port_range and (server.server .. ":" .. server.port_range)) or (server.server_port and (server.server .. ":" .. server.server_port)), bandwidth = { up = tonumber(server.uplink_capacity) and tonumber(server.uplink_capacity) .. " mbps" or nil, down = tonumber(server.downlink_capacity) and tonumber(server.downlink_capacity) .. " mbps" or nil @@ -327,6 +327,7 @@ local hysteria = { auth = server.hy2_auth, tls = (server.tls_host) and { sni = server.tls_host, + alpn = server.tls_alpn or nil, insecure = (server.insecure == "1") and true or false, pinSHA256 = (server.insecure == "1") and server.pinsha256 or nil } or {