Fix Shadowsocks tests; AEAD drop small UDP packets

https://t.me/projectXray/172063
This commit is contained in:
RPRX 2021-01-19 10:35:30 +00:00 committed by GitHub
parent 33755d6e90
commit 8ff43519fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 21 deletions

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