From cec900b596fd94bf5b93385f22a4194ccb56399a Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 12 Mar 2024 14:07:53 +0100 Subject: [PATCH] [xray] add outbound sendThrough #1017 --- web/assets/js/model/outbound.js | 4 ++++ web/html/xui/form/outbound.html | 3 +++ web/translation/translate.en_US.toml | 1 + web/translation/translate.fa_IR.toml | 1 + web/translation/translate.ru_RU.toml | 1 + web/translation/translate.vi_VN.toml | 1 + web/translation/translate.zh_Hans.toml | 1 + 7 files changed, 12 insertions(+) diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 631a8aca..cbfcfd3c 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -476,6 +476,7 @@ class Outbound extends CommonClass { protocol=Protocols.VMess, settings=null, streamSettings = new StreamSettings(), + sendThrough, mux = new Mux(), ) { super(); @@ -483,6 +484,7 @@ class Outbound extends CommonClass { this._protocol = protocol; this.settings = settings == null ? Outbound.Settings.getSettings(protocol) : settings; this.stream = streamSettings; + this.sendThrough = sendThrough; this.mux = mux; } @@ -548,6 +550,7 @@ class Outbound extends CommonClass { json.protocol, Outbound.Settings.fromJson(json.protocol, json.settings), StreamSettings.fromJson(json.streamSettings), + json.sendThrough, Mux.fromJson(json.mux), ) } @@ -565,6 +568,7 @@ class Outbound extends CommonClass { protocol: this.protocol, settings: this.settings instanceof CommonClass ? this.settings.toJson() : this.settings, streamSettings: stream, + sendThrough: this.sendThrough != "" ? this.sendThrough : undefined, mux: this.mux?.enabled ? this.mux : undefined, }; } diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index d7da9255..47348db4 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -11,6 +11,9 @@ + + +