diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 59eda396..21b8156a 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -524,11 +524,11 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
scMinPostsIntervalMs = 30,
noSSEHeader = false,
xPaddingBytes = "100-1000",
- xmux = {
- maxConnections: 0,
- maxConcurrency: 0,
- cMaxReuseTimes: 0,
- cMaxLifetimeMs: 0
+ xmux = {
+ maxConnections: '',
+ maxConcurrency: '',
+ cMaxReuseTimes: 0,
+ cMaxLifetimeMs: 0
}
) {
super();
@@ -540,7 +540,7 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
this.scMinPostsIntervalMs = scMinPostsIntervalMs;
this.noSSEHeader = noSSEHeader;
this.xPaddingBytes = RandomUtil.convertXPaddingBytes(xPaddingBytes);
- this.xmux = xmux;
+ this.xmux = xmux;
}
addHeader(name, value) {
@@ -573,6 +573,15 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
}
toJson() {
+ const xmuxData = {};
+ if (!ObjectUtil.isEmpty(this.xmux.maxConnections)) {
+ xmuxData.maxConnections = RandomUtil.convertXPaddingBytes(this.xmux.maxConnections);
+ }
+ if (!ObjectUtil.isEmpty(this.xmux.maxConcurrency)) {
+ xmuxData.maxConcurrency = RandomUtil.convertXPaddingBytes(this.xmux.maxConcurrency);
+ }
+ xmuxData.cMaxReuseTimes = RandomUtil.convertXPaddingBytes(this.xmux.cMaxReuseTimes);
+ xmuxData.cMaxLifetimeMs = RandomUtil.convertXPaddingBytes(this.xmux.cMaxLifetimeMs);
return {
path: this.path,
host: this.host,
@@ -582,12 +591,7 @@ 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
- }
+ xmux: xmuxData,
};
}
}
diff --git a/web/html/xui/form/stream/stream_splithttp.html b/web/html/xui/form/stream/stream_splithttp.html
index 1399b84c..5928e443 100644
--- a/web/html/xui/form/stream/stream_splithttp.html
+++ b/web/html/xui/form/stream/stream_splithttp.html
@@ -48,17 +48,42 @@
-
-
+
+
+
+ Max Connections
+
+
+ maxConnections: 默认值为空 为0(即无限) 要打开的最大连接数,连接达到此值前核心会积极打开连接,对每一条流都新建一个连接,直到达到该值。
+ 然后核心会开始复用已经建立的连接。 与 maxConcurrency 冲突。
+ 所有字段类型均为 int/string 均支持固定值 16 或浮动值 "8-32" 的写法
+
+
+
+
+
-
-
+
+
+
+ Max Concurrency
+
+
+ maxConcurrency: 默认值为空 为0(即无限) 每个连接中复用的流的最大数量,连接中流的数量达到该值后核心会新建更多连接以容纳更多的流,
+ 类似于 mux.cool 的 concurrency. 与 maxConnections 冲突。
+ 所有字段类型均为 int/string 均支持固定值 16 或浮动值 "8-32" 的写法
+
+
+
+
+
+
-
+
-
+
{{end}}
\ No newline at end of file