mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-18 05:04:40 +03:00
feat: Add random Reality Target/SNI selection from 52 popular services (#3577)
* feat: Add random Reality Target/SNI selection from 52 popular services - Created reality_targets.js with list of 52 popular services - Updated RealityStreamSettings to use random targets by default - Added UI randomize buttons with sync icon in Reality settings form - Implemented randomizeRealityTarget() method in inbound modal - Replaces hardcoded google.com with diverse global services * fix --------- Co-authored-by: mhsanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user