Skip to content

Commit

Permalink
change the protocal string format
Browse files Browse the repository at this point in the history
  • Loading branch information
zizifn authored Nov 27, 2024
1 parent d42abe6 commit 58686d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/worker-vless.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion src/worker-with-socks5-experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58686d5

Please sign in to comment.