feat: Converter support packet encodings for VMess

This commit is contained in:
gVisor bot 2022-10-02 21:10:29 +08:00
parent 4817d69dbb
commit 424dc76ba2

View File

@ -144,6 +144,14 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
if encryption := query.Get("encryption"); 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)
continue
}