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:
Diffstat (limited to 'web/assets/js/model/inbound.js')
-rw-r--r--web/assets/js/model/inbound.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js
index aecedf75..0718b20c 100644
--- a/web/assets/js/model/inbound.js
+++ b/web/assets/js/model/inbound.js
@@ -729,8 +729,8 @@ class RealityStreamSettings extends XrayCommonClass {
constructor(
show = false,
xver = 0,
- target = 'google.com:443',
- serverNames = 'google.com,www.google.com',
+ target = '',
+ serverNames = '',
privateKey = '',
minClientVer = '',
maxClientVer = '',
@@ -740,6 +740,14 @@ class RealityStreamSettings extends XrayCommonClass {
settings = new RealityStreamSettings.Settings()
) {
super();
+ // If target/serverNames are not provided, use random values
+ if (!target && !serverNames) {
+ const randomTarget = typeof getRandomRealityTarget !== 'undefined'
+ ? getRandomRealityTarget()
+ : { target: 'google.com:443', sni: 'google.com,www.google.com' };
+ target = randomTarget.target;
+ serverNames = randomTarget.sni;
+ }
this.show = show;
this.xver = xver;
this.target = target;