fix: SS 解析增加默认节点名

This commit is contained in:
xream 2025-04-20 20:10:08 +08:00
parent 55cc7dcd16
commit 7f691c8511
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -128,8 +128,8 @@ function URI_SS() {
// parse url
let content = line.split('ss://')[1];
let name = line.split('#')[1];
const proxy = {
name: decodeURIComponent(line.split('#')[1]),
type: 'ss',
};
content = content.split('#')[0]; // strip proxy name
@ -260,6 +260,10 @@ function URI_SS() {
if (/(&|\?)tfo=(1|true)/i.test(query)) {
proxy.tfo = true;
}
if (name != null) {
name = decodeURIComponent(name);
}
proxy.name = name ?? `SS ${proxy.server}:${proxy.port}`;
return proxy;
};
return { name, test, parse };