feat: Surge Hysteria2 与 TUIC 协议支持端口跳跃; Hysteria2 URI 的端口部分支持 端口跳跃 的「多端口地址格式」

This commit is contained in:
xream
2024-09-02 16:29:05 +08:00
parent 562d349629
commit 59fe16a7b0
7 changed files with 100 additions and 21 deletions

View File

@@ -424,8 +424,12 @@ function lastParse(proxy) {
proxy[`${proxy.network}-opts`].path = [transportPath];
}
}
if (['hysteria', 'hysteria2'].includes(proxy.type) && !proxy.ports) {
delete proxy.ports;
if (['hysteria', 'hysteria2'].includes(proxy.type)) {
if (proxy.ports) {
proxy.ports = proxy.ports.replace(/\//g, ',');
} else {
delete proxy.ports;
}
}
if (
['hysteria2'].includes(proxy.type) &&