From cb4c843dbf3665ad260a8701384eaccaff69b691 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 16 May 2023 13:43:17 +0200 Subject: [PATCH] [sub] more text length for random subID --- web/assets/js/util/utils.js | 4 ++-- web/html/xui/form/client.html | 2 +- web/html/xui/form/protocol/shadowsocks.html | 2 +- web/html/xui/form/protocol/trojan.html | 2 +- web/html/xui/form/protocol/vless.html | 2 +- web/html/xui/form/protocol/vmess.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js index b56207ab..8927833b 100644 --- a/web/assets/js/util/utils.js +++ b/web/assets/js/util/utils.js @@ -134,10 +134,10 @@ class RandomUtil { }); } - static randomText() { + static randomText(minLen = 6, varLen = 5) { var chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; var string = ''; - var len = 6 + Math.floor(Math.random() * 5); + var len = minLen + Math.floor(Math.random() * varLen); for (var ii = 0; ii < len; ii++) { string += chars[Math.floor(Math.random() * chars.length)]; } diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index 5119a1c1..4db3c425 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -55,7 +55,7 @@ - Subscription + Subscription diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html index fdf2f93c..70a8705e 100644 --- a/web/html/xui/form/protocol/shadowsocks.html +++ b/web/html/xui/form/protocol/shadowsocks.html @@ -30,7 +30,7 @@ - Subscription + Subscription diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index 848eac4f..a6787deb 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -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 bb23a77f..db381004 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -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 c03dee07..3e8e4875 100644 --- a/web/html/xui/form/protocol/vmess.html +++ b/web/html/xui/form/protocol/vmess.html @@ -36,7 +36,7 @@ - Subscription + Subscription