feat: Converter support packet encodings for VMess
This commit is contained in:
parent
c1a82f2fae
commit
6ce3805719
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue