Update xray.js

If you want to have different SNI for different Inbounds, using different domain names and different certificates, the link 
uuid@address:port won't work, instead you must use the SNI of individual inbounds
This commit is contained in:
Amir Eskandari 2024-01-29 22:11:17 +01:00 committed by GitHub
parent 9f904f8f47
commit 329843e85b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1336,7 +1336,7 @@ class Inbound extends XrayCommonClass {
params.set("security", "none");
}
const link = `vless://${uuid}@${address}:${port}`;
const link = `vless://${uuid}@${this.stream.tls.sni}:${port}`;
const url = new URL(link);
for (const [key, value] of params) {
url.searchParams.set(key, value)
@ -2322,4 +2322,4 @@ Inbound.WireguardSettings.Peer = class extends XrayCommonClass {
keepAlive: this.keepAlive?? undefined,
};
}
};
};