feat: 处理不规范的 hysteria2 节点

This commit is contained in:
xream
2024-07-19 09:45:28 +08:00
parent b08f6ea13b
commit 6f18dae272
2 changed files with 10 additions and 1 deletions

View File

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

View File

@@ -414,6 +414,15 @@ function lastParse(proxy) {
if (['hysteria', 'hysteria2'].includes(proxy.type) && !proxy.ports) {
delete proxy.ports;
}
if (
['hysteria2'].includes(proxy.type) &&
proxy.obfs &&
!['salamander'].includes(proxy.obfs) &&
!proxy['obfs-password']
) {
proxy['obfs-password'] = proxy.obfs;
proxy.obfs = 'salamander';
}
if (['vless'].includes(proxy.type)) {
// 删除 reality-opts: {}
if (