From 693847e7e358a990979eda8b55b8d560c816c9c3 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Sun, 31 Mar 2024 01:52:03 +0800 Subject: [PATCH 1/3] xray-core: update to 1.8.10 (#1437) * xray-core: update to 1.8.10 --- xray-core/Makefile | 4 ++-- xray-core/patches/010-go1.21.patch | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 xray-core/patches/010-go1.21.patch diff --git a/xray-core/Makefile b/xray-core/Makefile index 9ab1d720..07535f26 100644 --- a/xray-core/Makefile +++ b/xray-core/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xray-core -PKG_VERSION:=1.8.9 +PKG_VERSION:=1.8.10 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=708cf7754c733c8eb98939495c0c2e698ca5712383b87dc25eea974a0d332721 +PKG_HASH:=af5bb501b50e3abe6b54c8d8ea764d7f8b021c4d53540a468254a24f3334afc5 PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=MPL-2.0 diff --git a/xray-core/patches/010-go1.21.patch b/xray-core/patches/010-go1.21.patch deleted file mode 100644 index a95d4181..00000000 --- a/xray-core/patches/010-go1.21.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/go.mod -+++ b/go.mod -@@ -1,6 +1,6 @@ - module github.com/xtls/xray-core - --go 1.22 -+go 1.21.5 - - require ( - github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 From e0042b7216d7981f931516b9c6c2c4a5493c4599 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Sun, 31 Mar 2024 01:52:18 +0800 Subject: [PATCH 2/3] xray-plugin: update to 1.8.10 (#1438) * xray-plugin: update to 1.8.10 --- xray-plugin/Makefile | 4 ++-- xray-plugin/patches/010-go1.21.patch | 27 --------------------------- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 xray-plugin/patches/010-go1.21.patch diff --git a/xray-plugin/Makefile b/xray-plugin/Makefile index a8e96d36..7d53c33a 100644 --- a/xray-plugin/Makefile +++ b/xray-plugin/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xray-plugin -PKG_VERSION:=1.8.9 +PKG_VERSION:=1.8.10 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/teddysun/xray-plugin/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=728ad3eacc089af4a4f0e0aa539e1c6922ae391905f7b45bf5dc89f256f5b1c9 +PKG_HASH:=ee2f403682c664108d00791540c544b6ae6f24dc84db876bd4d8f7ba618e9cba PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/xray-plugin/patches/010-go1.21.patch b/xray-plugin/patches/010-go1.21.patch deleted file mode 100644 index 723de095..00000000 --- a/xray-plugin/patches/010-go1.21.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/go.mod -+++ b/go.mod -@@ -1,9 +1,9 @@ - module github.com/teddysun/xray-plugin - --go 1.22 -+go 1.21.5 - - require ( -- github.com/xtls/xray-core v1.8.9 -+ github.com/xtls/xray-core v1.8.7 - google.golang.org/protobuf v1.33.0 - ) - ---- a/go.sum -+++ b/go.sum -@@ -157,8 +157,8 @@ github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1Y - github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= - github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19 h1:capMfFYRgH9BCLd6A3Er/cH3A9Nz3CU2KwxwOQZIePI= - github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE= --github.com/xtls/xray-core v1.8.9 h1:wefcON0behu4DoQvCKJYZKsJlSvNhyq2I7vC2fxLFcY= --github.com/xtls/xray-core v1.8.9/go.mod h1:XDE4f422qJKAU3hNDSNZyWrOHvn9kF8UHVdyOzU38rc= -+github.com/xtls/xray-core v1.8.7 h1:lb8O1l3/eAg3YAXA6tLm5M6N7BsX8wxW9sJLjU3dHkA= -+github.com/xtls/xray-core v1.8.7/go.mod h1:9rFpflfQbgFeH1VKJw7yUmEy7myOyDCgNXXl0bmmyOo= - go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= - go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= - go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= From 7e632a1c446bf85a8006f44164165983d7c258da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=81=8B?= <88967758+chika0801@users.noreply.github.com> Date: Sun, 31 Mar 2024 01:53:14 +0800 Subject: [PATCH 3/3] luci-app-ssr-plus: Add options menu for httpupgrade (#1433) --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 13 +++++++++++++ luci-app-ssr-plus/po/zh-cn/ssr-plus.po | 6 ++++++ .../root/usr/share/shadowsocksr/gen_config.lua | 5 +++++ 3 files changed, 24 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 46907b0d..3bf73380 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") @@ -674,6 +675,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域名 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 82cd1390..88ed1342 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 主机名" 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 688e184c..13e528be 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 "",