From 329843e85b8160fd1c3cbca74e49e4afaf679669 Mon Sep 17 00:00:00 2001 From: Amir Eskandari Date: Mon, 29 Jan 2024 22:11:17 +0100 Subject: [PATCH] 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 --- web/assets/js/model/xray.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index e9676252..01d32231 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -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, }; } -}; \ No newline at end of file +};