feat: 兼容部分不规范的机场 Hysteria/Hysteria2 端口跳跃字段为空时 删除此字段

This commit is contained in:
xream
2023-12-17 18:31:12 +08:00
parent 8b75c11587
commit f10e5913fb
2 changed files with 4 additions and 1 deletions

View File

@@ -276,6 +276,9 @@ function lastParse(proxy) {
proxy[`${proxy.network}-opts`].path = [transportPath];
}
}
if (['hysteria', 'hysteria2'].includes(proxy.type) && !proxy.ports) {
delete proxy.ports;
}
return proxy;
}