Feature: add basic support for the VLESS protocol (#2891)

This commit is contained in:
crwnet
2023-08-24 13:24:45 +08:00
committed by GitHub
parent 651a36964e
commit 8a4c46ae77
16 changed files with 893 additions and 25 deletions

View File

@@ -48,6 +48,8 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
break
}
proxy = outbound.NewHttp(*httpOption)
case "vless":
fallthrough
case "vmess":
vmessOption := &outbound.VmessOption{
HTTPOpts: outbound.HTTPOptions{
@@ -59,7 +61,11 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
if err != nil {
break
}
proxy, err = outbound.NewVmess(*vmessOption)
if proxyType == "vless" {
proxy, err = outbound.NewVless(*vmessOption)
} else {
proxy, err = outbound.NewVmess(*vmessOption)
}
case "snell":
snellOption := &outbound.SnellOption{}
err = decoder.Decode(mapping, snellOption)