diff --git a/src/worker-vless.js b/src/worker-vless.js index 601350a20..19b106b1f 100644 --- a/src/worker-vless.js +++ b/src/worker-vless.js @@ -600,7 +600,12 @@ async function handleUDPOutBound(webSocket, vlessResponseHeader, log) { * @returns {string} */ function getVLESSConfig(userID, hostName) { - const vlessMain = `vless://${userID}\u0040${hostName}:443?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}` + const protocol = "vless"; + const vlessMain = + `${protocol}` + + `://${userID}@${hostName}:443`+ + `?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}`; + return ` ################################################################ v2ray diff --git a/src/worker-with-socks5-experimental.js b/src/worker-with-socks5-experimental.js index 894189028..f7ee448c1 100644 --- a/src/worker-with-socks5-experimental.js +++ b/src/worker-with-socks5-experimental.js @@ -769,7 +769,12 @@ function socks5AddressParser(address) { * @returns {string} */ function getVLESSConfig(userID, hostName) { - const vlessMain = `vless://${userID}\u0040${hostName}:443?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}` + const protocol = "vless"; + const vlessMain = + `${protocol}` + + `://${userID}@${hostName}:443`+ + `?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}`; + return ` ################################################################ v2ray