Fix Shadowsocks tests; AEAD drop small UDP packets

https://t.me/projectXray/172063
This commit is contained in:
RPRX authored and GitHub committed 2021-01-19 10:35:30 +00:00
1 parent 33755d6e90
commit 8ff43519fd
3 files changed
+24 -21

No files matched your search

+3
View File
@@ -268,6 +268,9 @@ func DecodeUDPPacket(users []*protocol.MemoryUser, payload *buf.Buffer) (*protoc
if len(users) > 1 {
bs := payload.Bytes()
if len(bs) <= 32 {
return nil, nil, newError("len(bs) <= 32")
}
var aeadCipher *AEADCipher
var ivLen int32