fix (General.php): VLESS parsing issue (#1017)

Replace urlencode with rawurlencode to prevent spaces from being improperly converted to '+' in node names (e.g., 'HKG 01' becoming 'HKG+01'). 

A tiny one-line change that significantly improves the UX.
This commit is contained in:
JW-3154 2026-08-07 21:44:44 +08:00 committed by GitHub
parent 8ecb762d77
commit 60ba57142b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,7 +239,7 @@ class General extends AbstractProtocol
$user = $uuid . '@' . Helper::wrapIPv6($host) . ':' . $port; $user = $uuid . '@' . Helper::wrapIPv6($host) . ':' . $port;
$query = http_build_query($config); $query = http_build_query($config);
$fragment = urlencode($name); $fragment = rawurlencode($name);
$link = sprintf("vless://%s?%s#%s\r\n", $user, $query, $fragment); $link = sprintf("vless://%s?%s#%s\r\n", $user, $query, $fragment);
return $link; return $link;
} }