From 9a0055d5d59d24ed7b7d9c1e9106acd5de4abee9 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 28 Feb 2023 10:25:27 +0100 Subject: [PATCH] Rollback useless utls feature --- web/assets/js/model/xray.js | 39 ++++++++++++--------------- web/html/xui/form/client.html | 5 ---- web/html/xui/form/protocol/vless.html | 5 ---- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 5199d221..8d855faf 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1412,12 +1412,12 @@ Inbound.VLESSSettings = class extends Inbound.Settings { } // decryption should be set to static value - static fromJson({clients, decryption, fallbacks}={}) { + static fromJson(json={}) { return new Inbound.VLESSSettings( Protocols.VLESS, - clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)), + json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)), 'none', - Inbound.VLESSSettings.Fallback.fromJson(fallbacks), + Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks), ); } @@ -1432,25 +1432,23 @@ Inbound.VLESSSettings = class extends Inbound.Settings { }; Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { - constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, expiryTime='') { + constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') { super(); this.id = id; this.flow = flow; this.email = email; this.totalGB = totalGB; - this.fingerprint = fingerprint; this.expiryTime = expiryTime; } - static fromJson({id, flow, email, totalGB, fingerprint, expiryTime} = {}) { + static fromJson(json={}) { return new Inbound.VLESSSettings.VLESS( - id, - flow, - email, - totalGB, - fingerprint, - expiryTime + json.id, + json.flow, + json.email, + json.totalGB, + json.expiryTime, ); } @@ -1547,13 +1545,12 @@ Inbound.TrojanSettings = class extends Inbound.Settings { } }; Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { - constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, expiryTime='') { + constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') { super(); this.password = password; this.flow = flow; this.email = email; this.totalGB = totalGB; - this.fingerprint = fingerprint; this.expiryTime = expiryTime; } @@ -1563,19 +1560,17 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { flow: this.flow, email: this.email, totalGB: this.totalGB, - fingerprint: this.fingerprint, expiryTime: this.expiryTime, }; } - static fromJson({password, flow, email, totalGB, fingerprint, expiryTime} = {}) { + static fromJson(json = {}) { return new Inbound.TrojanSettings.Trojan( - password, - flow, - email, - totalGB, - fingerprint, - expiryTime, + json.password, + json.flow, + json.email, + json.totalGB, + json.expiryTime, ); } diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index dac50515..71b86664 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -21,11 +21,6 @@ - - - [[ key ]] - - diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index fe60fcfe..c2f76b40 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -31,11 +31,6 @@ [[ key ]] - - - [[ key ]] - - {{ i18n "pages.inbounds.totalFlow" }}(GB)