fix: 处理 Hysteria2 URI 中的密码部分

This commit is contained in:
xream 2023-12-09 02:08:59 +08:00
parent d636e1b94c
commit d0cba285ab
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.116",
"version": "2.14.117",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -258,11 +258,11 @@ export default function URI_Producer() {
if (proxy.tfo) {
hysteria2params.push(`fastopen=1`);
}
result = `hysteria2://${proxy.password}@${proxy.server}:${
proxy.port
}?${hysteria2params.join('&')}#${encodeURIComponent(
proxy.name,
)}`;
result = `hysteria2://${encodeURIComponent(proxy.password)}@${
proxy.server
}:${proxy.port}?${hysteria2params.join(
'&',
)}#${encodeURIComponent(proxy.name)}`;
break;
}
return result;