Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/assets/js/model/inbound.js')
-rw-r--r--web/assets/js/model/inbound.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js
index 41121b66..0e403fce 100644
--- a/web/assets/js/model/inbound.js
+++ b/web/assets/js/model/inbound.js
@@ -113,6 +113,12 @@ const USERS_SECURITY = {
ZERO: "zero",
};
+const MODE_OPTION = {
+ AUTO: "auto",
+ PACKET_UP: "packet-up",
+ STREAM_UP: "stream-up",
+};
+
Object.freeze(Protocols);
Object.freeze(SSMethods);
Object.freeze(TLS_FLOW_CONTROL);
@@ -125,6 +131,7 @@ Object.freeze(USAGE_OPTION);
Object.freeze(DOMAIN_STRATEGY_OPTION);
Object.freeze(TCP_CONGESTION_OPTION);
Object.freeze(USERS_SECURITY);
+Object.freeze(MODE_OPTION);
class XrayCommonClass {
@@ -528,7 +535,8 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
maxConnections: 0,
cMaxReuseTimes: "64-128",
cMaxLifetimeMs: 0
- }
+ },
+ mode = MODE_OPTION.AUTO,
) {
super();
this.path = path;
@@ -540,6 +548,7 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
this.noSSEHeader = noSSEHeader;
this.xPaddingBytes = xPaddingBytes;
this.xmux = xmux;
+ this.mode = mode;
}
addHeader(name, value) {
@@ -561,6 +570,7 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
json.noSSEHeader,
json.xPaddingBytes,
json.xmux,
+ json.mode,
);
}
@@ -579,7 +589,8 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
maxConnections: this.xmux.maxConnections,
cMaxReuseTimes: this.xmux.cMaxReuseTimes,
cMaxLifetimeMs: this.xmux.cMaxLifetimeMs
- }
+ },
+ mode: this.mode,
};
}
}
@@ -1329,6 +1340,7 @@ class Inbound extends XrayCommonClass {
const splithttp = this.stream.splithttp;
obj.path = splithttp.path;
obj.host = splithttp.host?.length > 0 ? splithttp.host : this.getHeader(splithttp, 'host');
+ obj.mode = splithttp.mode;
}
if (security === 'tls') {
@@ -1401,6 +1413,7 @@ class Inbound extends XrayCommonClass {
const splithttp = this.stream.splithttp;
params.set("path", splithttp.path);
params.set("host", splithttp.host?.length > 0 ? splithttp.host : this.getHeader(splithttp, 'host'));
+ params.set("mode", splithttp.mode);
break;
}
@@ -1504,6 +1517,7 @@ class Inbound extends XrayCommonClass {
const splithttp = this.stream.splithttp;
params.set("path", splithttp.path);
params.set("host", splithttp.host?.length > 0 ? splithttp.host : this.getHeader(splithttp, 'host'));
+ params.set("mode", splithttp.mode);
break;
}
@@ -1586,6 +1600,7 @@ class Inbound extends XrayCommonClass {
const splithttp = this.stream.splithttp;
params.set("path", splithttp.path);
params.set("host", splithttp.host?.length > 0 ? splithttp.host : this.getHeader(splithttp, 'host'));
+ params.set("mode", splithttp.mode);
break;
}