feat: 处理不规范的 hysteria2 节点

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

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 (