chore: refactoring RandomUtil class

now we use window.crypto.getRandomValues to generate random values.
This commit is contained in:
Shishkevich D.
2025-03-09 06:37:05 +00:00
parent 64fa0e97a3
commit cedc7f0fb8
3 changed files with 27 additions and 38 deletions

View File

@@ -1050,7 +1050,7 @@ class Allocate extends XrayCommonClass {
class Inbound extends XrayCommonClass {
constructor(
port = RandomUtil.randomIntRange(10000, 60000),
port = RandomUtil.randomInteger(10000, 60000),
listen = '',
protocol = Protocols.VLESS,
settings = null,
@@ -1226,7 +1226,7 @@ class Inbound extends XrayCommonClass {
}
reset() {
this.port = RandomUtil.randomIntRange(10000, 60000);
this.port = RandomUtil.randomInteger(10000, 60000);
this.listen = '';
this.protocol = Protocols.VMESS;
this.settings = Inbound.Settings.getSettings(Protocols.VMESS);