From fe9844b51b04bb924bb0e5444b493668c9df92a2 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 16 Feb 2023 19:28:20 +0330 Subject: update pack --- web/assets/js/model/xray.js | 2 +- web/html/xui/form/protocol/trojan.html | 4 +- web/html/xui/form/protocol/vless.html | 4 +- web/html/xui/form/protocol/vmess.html | 4 +- web/html/xui/inbound_info_modal.html | 83 ++++++++++++++++++++++++++++------ web/html/xui/inbound_modal.html | 4 +- web/html/xui/inbounds.html | 31 ++++++++----- web/html/xui/inbounds_client_row.html | 16 +++---- web/service/server.go | 16 +++---- 9 files changed, 114 insertions(+), 50 deletions(-) (limited to 'web') diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index ccddc591..f4b874b1 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -694,7 +694,7 @@ class Inbound extends XrayCommonClass { this._protocol = protocol; this.settings = Inbound.Settings.getSettings(protocol); if (protocol === Protocols.TROJAN) { - this.tls = true; + this.tls = false; } } get tls() { diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index fa5a2032..48fbfd4e 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -9,10 +9,10 @@ - Email + Username - Email + Username - Email + Username +
@@ -55,11 +57,47 @@
{{ i18n "pages.inbounds.client" }} - + + {{end}} \ No newline at end of file diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html index 0c2be412..4fec0ded 100644 --- a/web/html/xui/inbound_modal.html +++ b/web/html/xui/inbound_modal.html @@ -165,11 +165,11 @@ getNewEmail(client) { var chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; var string = ''; - var len = 6 + Math.floor(Math.random() * 5) + var len = 7 + Math.floor(Math.random() * 5) for(var ii=0; ii { if (ObjectUtil.deepSearch(inbound, key)) { - this.searchedInbounds.push(inbound); + const newInbound = new DBInbound(inbound); + const inboundSettings = JSON.parse(inbound.settings); + if (inboundSettings.hasOwnProperty('clients')){ + const searchedSettings = { "clients": [] }; + inboundSettings.clients.forEach(client => { + if (ObjectUtil.deepSearch(client, key)){ + searchedSettings.clients.push(client); + } + }); + newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, searchedSettings); + } + this.searchedInbounds.push(newInbound); } }); } diff --git a/web/html/xui/inbounds_client_row.html b/web/html/xui/inbounds_client_row.html index 7453d062..6e03e4ca 100644 --- a/web/html/xui/inbounds_client_row.html +++ b/web/html/xui/inbounds_client_row.html @@ -16,16 +16,16 @@ {{ i18n "disabled" }} + [[ sizeFormat(getUpStats(record, client.email)) ]] / [[ sizeFormat(getDownStats(record, client.email)) ]] + + {{ i18n "indefinite" }} +