chore: support wireguard outbound

This commit is contained in:
wwqgtxx
2022-11-09 18:44:06 +08:00
parent 1d784231b0
commit ae08d13de4
5 changed files with 356 additions and 15 deletions

View File

@ -88,6 +88,13 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
break
}
proxy, err = outbound.NewHysteria(*hyOption)
case "wireguard":
hyOption := &outbound.WireGuardOption{}
err = decoder.Decode(mapping, hyOption)
if err != nil {
break
}
proxy, err = outbound.NewWireGuard(*hyOption)
default:
return nil, fmt.Errorf("unsupport proxy type: %s", proxyType)
}