From 02a520d9ba00814017f79893cce2c62036bcdc33 Mon Sep 17 00:00:00 2001
From: qist <87984115@qq.com>
Date: Thu, 19 Sep 2024 10:07:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20SplitHTTP=20xmux?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/version | 2 +-
go.mod | 4 ++--
go.sum | 8 ++++----
web/assets/js/model/xray.js | 20 ++++++++++++++++---
.../xui/form/stream/stream_splithttp.html | 14 ++++++++++++-
5 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/config/version b/config/version
index d3429c4d..959d5497 100644
--- a/config/version
+++ b/config/version
@@ -1 +1 @@
-24.9.9
\ No newline at end of file
+24.9.19
\ No newline at end of file
diff --git a/go.mod b/go.mod
index a872e32d..33dae225 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,7 @@ require (
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.24.5
- github.com/xtls/xray-core v1.8.25-0.20240908221010-1f2931903976
+ github.com/xtls/xray-core v1.8.25-0.20240919011229-bc28cad8f87a
go.uber.org/atomic v1.11.0
golang.org/x/crypto v0.27.0
golang.org/x/text v0.18.0
@@ -49,7 +49,7 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pires/go-proxyproto v0.7.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
- github.com/sagernet/sing v0.4.1 // indirect
+ github.com/sagernet/sing v0.4.3 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
diff --git a/go.sum b/go.sum
index fb692689..7ec7a48e 100644
--- a/go.sum
+++ b/go.sum
@@ -119,8 +119,8 @@ github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
-github.com/sagernet/sing v0.4.1 h1:zVlpE+7k7AFoC2pv6ReqLf0PIHjihL/jsBl5k05PQFk=
-github.com/sagernet/sing v0.4.1/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=
+github.com/sagernet/sing v0.4.3 h1:Ty/NAiNnVd6844k7ujlL5lkzydhcTH5Psc432jXA4Y8=
+github.com/sagernet/sing v0.4.3/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 h1:emzAzMZ1L9iaKCTxdy3Em8Wv4ChIAGnfiz18Cda70g4=
@@ -161,8 +161,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-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg=
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE=
-github.com/xtls/xray-core v1.8.25-0.20240908221010-1f2931903976 h1:rde4VXWBEgpDGTy9ZWdANRT0jIZJ5qnZiBEfvBS/XlM=
-github.com/xtls/xray-core v1.8.25-0.20240908221010-1f2931903976/go.mod h1:fJZjuOpUJXPMrZj7agA8lMkz34U2ziEybL/+ABblwE8=
+github.com/xtls/xray-core v1.8.25-0.20240919011229-bc28cad8f87a h1:jpitqUboMi5YXGPDgi0vDajThRprtZ/nhjUBn0JuduU=
+github.com/xtls/xray-core v1.8.25-0.20240919011229-bc28cad8f87a/go.mod h1:l03adDk7IwHvIoRHNKQWI3SGIq/96RFP95/rDHk++30=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index be1c66e0..59eda396 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -523,7 +523,13 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
scMaxConcurrentPosts = 100,
scMinPostsIntervalMs = 30,
noSSEHeader = false,
- xPaddingBytes = "100-1000"
+ xPaddingBytes = "100-1000",
+ xmux = {
+ maxConnections: 0,
+ maxConcurrency: 0,
+ cMaxReuseTimes: 0,
+ cMaxLifetimeMs: 0
+ }
) {
super();
this.path = path;
@@ -533,7 +539,8 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
this.scMaxConcurrentPosts = scMaxConcurrentPosts;
this.scMinPostsIntervalMs = scMinPostsIntervalMs;
this.noSSEHeader = noSSEHeader;
- this.xPaddingBytes = RandomUtil.convertXPaddingBytes(xPaddingBytes);
+ this.xPaddingBytes = RandomUtil.convertXPaddingBytes(xPaddingBytes);
+ this.xmux = xmux;
}
addHeader(name, value) {
@@ -560,7 +567,8 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
json.scMaxConcurrentPosts,
json.scMinPostsIntervalMs,
json.noSSEHeader,
- json.xPaddingBytes
+ json.xPaddingBytes,
+ json.xmux,
);
}
@@ -574,6 +582,12 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
scMinPostsIntervalMs: this.scMinPostsIntervalMs,
noSSEHeader: this.noSSEHeader,
xPaddingBytes: RandomUtil.convertXPaddingBytes(this.xPaddingBytes),
+ xmux: {
+ maxConnections: this.xmux.maxConnections,
+ maxConcurrency: this.xmux.maxConcurrency,
+ cMaxReuseTimes: this.xmux.cMaxReuseTimes,
+ cMaxLifetimeMs: this.xmux.cMaxLifetimeMs
+ }
};
}
}
diff --git a/web/html/xui/form/stream/stream_splithttp.html b/web/html/xui/form/stream/stream_splithttp.html
index c97622ed..1399b84c 100644
--- a/web/html/xui/form/stream/stream_splithttp.html
+++ b/web/html/xui/form/stream/stream_splithttp.html
@@ -46,7 +46,19 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
{{end}}
\ No newline at end of file