feat: Converter support packet encodings for VMess

This commit is contained in:
H1JK 2022-10-02 21:10:29 +08:00
parent c1a82f2fae
commit 6ce3805719

View file

@ -144,6 +144,14 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
if encryption := query.Get("encryption"); encryption != "" { if encryption := query.Get("encryption"); encryption != "" {
vmess["cipher"] = encryption vmess["cipher"] = encryption
} }
if packetEncoding := query.Get("packetEncoding"); packetEncoding != "" {
switch packetEncoding {
case "packet":
vmess["packet-addr"] = true
case "xudp":
vmess["xudp"] = true
}
}
proxies = append(proxies, vmess) proxies = append(proxies, vmess)
continue continue
} }