fix: 修复 Clash 节点名为 binary 的情况

This commit is contained in:
xream 2024-03-03 12:38:42 +08:00
parent 468d136f0e
commit 4d57a4144b
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 8 additions and 1 deletions

View File

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

View File

@ -370,6 +370,13 @@ function lastParse(proxy) {
}
}
}
if (proxy.name?.type === 'Buffer') {
try {
proxy.name = Buffer.from(proxy.name.data).toString('utf8');
} catch (e) {
proxy.name = `${proxy.type} ${proxy.server}:${proxy.port}`;
}
}
return proxy;
}