From 10f54cd9370a8be5676c59faeb02e662bbc4934b Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Tue, 12 Mar 2024 19:23:48 +0330 Subject: [PATCH] [xray] add outbound sendThrough + warp typo fix Co-Authored-By: Alireza Ahmadi --- web/assets/js/model/outbound.js | 4 ++++ web/html/xui/form/outbound.html | 3 +++ web/html/xui/warp_modal.html | 27 +++++++++++++------------- web/translation/translate.en_US.toml | 4 ++++ web/translation/translate.es_ES.toml | 4 ++++ web/translation/translate.fa_IR.toml | 4 ++++ web/translation/translate.id_ID.toml | 4 ++++ web/translation/translate.ru_RU.toml | 4 ++++ web/translation/translate.uk_UA.toml | 4 ++++ web/translation/translate.vi_VN.toml | 4 ++++ web/translation/translate.zh_Hans.toml | 4 ++++ 11 files changed, 52 insertions(+), 14 deletions(-) diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 707e76c5..34055ef6 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -501,6 +501,7 @@ class Outbound extends CommonClass { protocol=Protocols.VMess, settings=null, streamSettings = new StreamSettings(), + sendThrough, mux = new Mux(), ) { super(); @@ -508,6 +509,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; } @@ -573,6 +575,7 @@ class Outbound extends CommonClass { json.protocol, Outbound.Settings.fromJson(json.protocol, json.settings), StreamSettings.fromJson(json.streamSettings), + json.sendThrough, Mux.fromJson(json.mux), ) } @@ -590,6 +593,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 6432dca7..70e8f6a7 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -11,6 +11,9 @@ + + +