feat: support Hysteria2

This commit is contained in:
wwqgtxx
2023-09-21 10:28:28 +08:00
parent 24fd577767
commit 9b8e2d9343
7 changed files with 269 additions and 36 deletions

View File

@ -92,6 +92,13 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
break
}
proxy, err = outbound.NewHysteria(*hyOption)
case "hysteria2":
hyOption := &outbound.Hysteria2Option{}
err = decoder.Decode(mapping, hyOption)
if err != nil {
break
}
proxy, err = outbound.NewHysteria2(*hyOption)
case "wireguard":
wgOption := &outbound.WireGuardOption{}
err = decoder.Decode(mapping, wgOption)