feat: add hysteria

This commit is contained in:
世界
2022-06-07 13:38:45 +08:00
parent 73d5042774
commit 35a6666a84
11 changed files with 1101 additions and 19 deletions

View File

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