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:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-11-14 12:39:51 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-11-14 12:39:51 +0300
commitccda652e69f5d613acca6346dda3c15fcb7ba36b (patch)
tree3fa49a7ccbbe2a9cdb98ddb2d2ac5fede99e7f3e /web/assets/js/model/outbound.js
parent2982d809ab4f5301a27b811509e7fb92f427673f (diff)
SplitHTTP - Mode
Diffstat (limited to 'web/assets/js/model/outbound.js')
-rw-r--r--web/assets/js/model/outbound.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index 78078dd6..35be85d8 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -77,6 +77,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);
@@ -85,6 +91,7 @@ Object.freeze(ALPN_OPTION);
Object.freeze(OutboundDomainStrategies);
Object.freeze(WireguardDomainStrategy);
Object.freeze(USERS_SECURITY);
+Object.freeze(MODE_OPTION);
class CommonClass {
@@ -320,16 +327,22 @@ class HttpUpgradeStreamSettings extends CommonClass {
}
class SplitHTTPStreamSettings extends CommonClass {
- constructor(path = '/', host = '') {
+ constructor(
+ path = '/',
+ host = '',
+ mode = '',
+ ) {
super();
this.path = path;
this.host = host;
+ this.mode = mode;
}
static fromJson(json = {}) {
return new SplitHTTPStreamSettings(
json.path,
json.host,
+ json.mode,
);
}
@@ -337,6 +350,7 @@ class SplitHTTPStreamSettings extends CommonClass {
return {
path: this.path,
host: this.host,
+ mode: this.mode,
};
}
}
@@ -710,7 +724,7 @@ class Outbound extends CommonClass {
} else if (network === 'httpupgrade') {
stream.httpupgrade = new HttpUpgradeStreamSettings(json.path, json.host);
} else if (network === 'splithttp') {
- stream.splithttp = new SplitHTTPStreamSettings(json.path, json.host);
+ stream.splithttp = new SplitHTTPStreamSettings(json.path, json.host, json.mode);
}
if (json.tls && json.tls == 'tls') {
@@ -754,7 +768,7 @@ class Outbound extends CommonClass {
} else if (type === 'httpupgrade') {
stream.httpupgrade = new HttpUpgradeStreamSettings(path, host);
} else if (type === 'splithttp') {
- stream.splithttp = new SplitHTTPStreamSettings(path, host);
+ stream.splithttp = new SplitHTTPStreamSettings(path, host, mode);
}
if (security == 'tls') {