Skip to content

Commit 58686d5

Browse files
authored
change the protocal string format
1 parent d42abe6 commit 58686d5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/worker-vless.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,12 @@ async function handleUDPOutBound(webSocket, vlessResponseHeader, log) {
600600
* @returns {string}
601601
*/
602602
function getVLESSConfig(userID, hostName) {
603-
const vlessMain = `vless://${userID}\u0040${hostName}:443?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}`
603+
const protocol = "vless";
604+
const vlessMain =
605+
`${protocol}` +
606+
`://${userID}@${hostName}:443`+
607+
`?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}`;
608+
604609
return `
605610
################################################################
606611
v2ray

src/worker-with-socks5-experimental.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,12 @@ function socks5AddressParser(address) {
769769
* @returns {string}
770770
*/
771771
function getVLESSConfig(userID, hostName) {
772-
const vlessMain = `vless://${userID}\u0040${hostName}:443?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}`
772+
const protocol = "vless";
773+
const vlessMain =
774+
`${protocol}` +
775+
`://${userID}@${hostName}:443`+
776+
`?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}`;
777+
773778
return `
774779
################################################################
775780
v2ray

0 commit comments

Comments
 (0)