Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <mc.sanaei@gmail.com>2023-02-18 15:37:32 +0300
committerMHSanaei <mc.sanaei@gmail.com>2023-02-18 15:37:32 +0300
commitb412df70f1b2e9f10b75e095a2329f10b48e01b5 (patch)
tree9d69f34fc53ce9662996494718a7f6aabab0b648 /web/assets
parentfe9844b51b04bb924bb0e5444b493668c9df92a2 (diff)
update pack 2
Diffstat (limited to 'web/assets')
-rw-r--r--web/assets/js/model/xray.js6
-rw-r--r--web/assets/js/util/utils.js10
2 files changed, 13 insertions, 3 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index f4b874b1..23d73930 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -1359,7 +1359,7 @@ Inbound.VmessSettings = class extends Inbound.Settings {
}
};
Inbound.VmessSettings.Vmess = class extends XrayCommonClass {
- constructor(id=RandomUtil.randomUUID(), alterId=0, email='', totalGB=0, expiryTime='') {
+ constructor(id=RandomUtil.randomUUID(), alterId=0, email=RandomUtil.randomText(), totalGB=0, expiryTime='') {
super();
this.id = id;
this.alterId = alterId;
@@ -1441,7 +1441,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
};
Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
- constructor(id=RandomUtil.randomUUID(), flow='', email='', totalGB=0, fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, expiryTime='') {
+ constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, expiryTime='') {
super();
this.id = id;
this.flow = flow;
@@ -1557,7 +1557,7 @@ Inbound.TrojanSettings = class extends Inbound.Settings {
}
};
Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
- constructor(password=RandomUtil.randomSeq(10), flow ='', email='', totalGB=0, expiryTime='') {
+ constructor(password=RandomUtil.randomSeq(10), flow ='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') {
super();
this.password = password;
this.flow = flow;
diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js
index 6b4e5ed9..f3a412e5 100644
--- a/web/assets/js/util/utils.js
+++ b/web/assets/js/util/utils.js
@@ -136,6 +136,16 @@ class RandomUtil {
return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);
});
}
+
+ static randomText() {
+ var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
+ var string = '';
+ var len = 6 + Math.floor(Math.random() * 5)
+ for(var ii=0; ii<len; ii++){
+ string += chars[Math.floor(Math.random() * chars.length)];
+ }
+ return string;
+ }
}
class ObjectUtil {