From 409bd58e8957ac621f2d35b9e3e27e85688e6e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=81=8B?= <88967758+chika0801@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:24:51 +0800 Subject: [PATCH 1/4] add httpupgrade in client-config.lua --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 46907b0d923..67988f9e9b5 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 @@ -674,6 +674,18 @@ if is_finded("v2ray") then o.rmempty = true end +-- [[ httpupgrade部分 ]]-- + +-- httpupgrade域名 +o = s:option(Value, "httpupgrade_host", translate("Httpupgrade Host")) +o:depends({transport = "httpupgrade", tls = false}) +o.rmempty = true + +-- httpupgrade路径 +o = s:option(Value, "httpupgrade_path", translate("Httpupgrade Path")) +o:depends("transport", "httpupgrade") +o.rmempty = true + -- [[ H2部分 ]]-- -- H2域名 From 4282202bc7612887df61d9b59567bbbbe4718aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=81=8B?= <88967758+chika0801@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:25:43 +0800 Subject: [PATCH 2/4] add httpupgrade in gen_config.lua --- luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua | 5 +++++ 1 file changed, 5 insertions(+) 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 688e184c2e9..13e528bead4 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 @@ -276,6 +276,11 @@ local Xray = { maxEarlyData = tonumber(server.ws_ed) or nil, earlyDataHeaderName = server.ws_ed_header or nil } or nil, + httpupgradeSettings = (server.transport == "httpupgrade") and { + -- httpupgrade + host = (server.httpupgrade_host or server.tls_host) or nil, + path = server.httpupgrade_path or "" + } or nil, httpSettings = (server.transport == "h2") and { -- h2 path = server.h2_path or "", From ead95bd927a0f65bc01820a81da7712f9fd297ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=81=8B?= <88967758+chika0801@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:27:17 +0800 Subject: [PATCH 3/4] add httpupgrade in ssr-plus.po --- luci-app-ssr-plus/po/zh-cn/ssr-plus.po | 6 ++++++ 1 file changed, 6 insertions(+) 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 82cd1390425..88ed1342ecd 100644 --- a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po +++ b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po @@ -921,6 +921,12 @@ msgstr "最大前置数据" msgid "Early Data Header Name" msgstr "前置数据标头" +msgid "Httpupgrade Host" +msgstr "HTTPUpgrade 主机名" + +msgid "Httpupgrade Path" +msgstr "HTTPUpgrade 路径" + msgid "HTTP/2 Host" msgstr "HTTP/2 主机名" From 41d232bbceb63c4fd068d6c81baeba4ef41f8ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=81=8B?= <88967758+chika0801@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:35:20 +0800 Subject: [PATCH 4/4] Update client-config.lua --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 1 + 1 file changed, 1 insertion(+) 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 67988f9e9b5..3bf73380d7e 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 @@ -618,6 +618,7 @@ o = s:option(ListValue, "transport", translate("Transport")) o:value("tcp", "TCP") o:value("kcp", "mKCP") o:value("ws", "WebSocket") +o:value("httpupgrade", "HTTPUpgrade") o:value("h2", "HTTP/2") o:value("quic", "QUIC") o:value("grpc", "gRPC")