feat: proxies support direct type

This commit is contained in:
wwqgtxx
2023-08-24 23:33:03 +08:00
parent 3a9fc39cd9
commit 0a7b7894bd
2 changed files with 27 additions and 0 deletions

View File

@ -106,6 +106,13 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
break
}
proxy, err = outbound.NewTuic(*tuicOption)
case "direct":
directOption := &outbound.DirectOption{}
err = decoder.Decode(mapping, directOption)
if err != nil {
break
}
proxy = outbound.NewDirectWithOption(*directOption)
default:
return nil, fmt.Errorf("unsupport proxy type: %s", proxyType)
}