diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index dc631cb2..1b22a134 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -35,7 +35,7 @@ const TLS_VERSION_OPTION = { TLS11: "1.1", TLS12: "1.2", TLS13: "1.3", -} +}; const TLS_CIPHER_OPTION = { RSA_AES_128_CBC: "TLS_RSA_WITH_AES_128_CBC_SHA", @@ -1534,7 +1534,7 @@ Inbound.VmessSettings = class extends Inbound.Settings { } }; Inbound.VmessSettings.Vmess = class extends XrayCommonClass { - constructor(id=RandomUtil.randomUUID(), email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { + constructor(id=RandomUtil.randomUUID(), email=RandomUtil.randomLowerAndNum(9), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16)) { super(); this.id = id; this.email = email; @@ -1622,7 +1622,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings { }; Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { - constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { + constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomLowerAndNum(9), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16)) { super(); this.id = id; this.flow = flow; @@ -1743,7 +1743,7 @@ Inbound.TrojanSettings = class extends Inbound.Settings { } }; Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { - constructor(password=RandomUtil.randomSeq(10), email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { + constructor(password=RandomUtil.randomSeq(10), email=RandomUtil.randomLowerAndNum(9), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16)) { super(); this.password = password; this.email = email; @@ -1879,7 +1879,7 @@ Inbound.ShadowsocksSettings = class extends Inbound.Settings { }; Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass { - constructor(method='', password=RandomUtil.randomShadowsocksPassword(), email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { + constructor(method='', password=RandomUtil.randomShadowsocksPassword(), email=RandomUtil.randomLowerAndNum(9), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16)) { super(); this.method = method; this.password = password; diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js index 0cfd787a..41346adf 100644 --- a/web/assets/js/util/utils.js +++ b/web/assets/js/util/utils.js @@ -75,17 +75,7 @@ class PromiseUtil { } } -const seq = [ - 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', - 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z' -]; +const seq = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); class RandomUtil { static randomIntRange(min, max) { @@ -121,16 +111,6 @@ class RandomUtil { }); } - static randomText(minLen = 6, varLen = 5) { - var chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; - var string = ''; - var len = minLen + Math.floor(Math.random() * varLen); - for (var ii = 0; ii < len; ii++) { - string += chars[Math.floor(Math.random() * chars.length)]; - } - return string; - } - static randomShadowsocksPassword() { let array = new Uint8Array(32); window.crypto.getRandomValues(array); diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html index ef4003c4..d56550c8 100644 --- a/web/html/xui/client_modal.html +++ b/web/html/xui/client_modal.html @@ -119,15 +119,6 @@ }, }, methods: { - getNewEmail(client) { - var chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; - var string = ''; - var len = 6 + Math.floor(Math.random() * 5); - for(var ii=0; ii {{ i18n "pages.inbounds.emailDesc" }} - + @@ -47,7 +47,7 @@ - Subscription + Subscription diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html index 808eed7d..3d49b383 100644 --- a/web/html/xui/form/protocol/shadowsocks.html +++ b/web/html/xui/form/protocol/shadowsocks.html @@ -11,7 +11,7 @@ - + @@ -31,7 +31,7 @@ - Subscription + Subscription diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index 8ab1c73a..c3fac086 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -10,7 +10,7 @@ - + @@ -28,7 +28,7 @@ - Subscription + Subscription diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index e174bd2e..20255837 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -1,7 +1,7 @@ {{define "form/vless"}} - + - +
@@ -10,7 +10,7 @@ - + @@ -39,7 +39,7 @@
Subscription Subscription diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html index adbf19de..2f52390f 100644 --- a/web/html/xui/form/protocol/vmess.html +++ b/web/html/xui/form/protocol/vmess.html @@ -1,7 +1,7 @@ {{define "form/vmess"}} - + - +
@@ -10,7 +10,7 @@ - + @@ -28,7 +28,7 @@
Subscription Subscription diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html index 131709e2..55aa9eb3 100644 --- a/web/html/xui/inbound_modal.html +++ b/web/html/xui/inbound_modal.html @@ -139,15 +139,6 @@ inModal.inbound.stream.reality.privateKey = msg.obj.privateKey; inModal.inbound.stream.reality.settings.publicKey = msg.obj.publicKey; }, - getNewEmail(client) { - var chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; - var string = ''; - var len = 6 + Math.floor(Math.random() * 5); - for(var ii=0; ii [[ backupModal.description ]]

- + [[ backupModal.exportText ]]