mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
fix(proxy): removed the udp payload length check when encryption is disabled
This commit is contained in:
parent
f67167bb3b
commit
a343d68944
3 changed files with 107 additions and 53 deletions
|
@ -80,6 +80,11 @@ func (v *Validator) Get(bs []byte, command protocol.RequestCommand) (u *protocol
|
|||
|
||||
for _, user := range v.users {
|
||||
if account := user.Account.(*MemoryAccount); account.Cipher.IsAEAD() {
|
||||
// AEAD payload decoding requires the payload to be over 32 bytes
|
||||
if len(bs) < 32 {
|
||||
continue
|
||||
}
|
||||
|
||||
aeadCipher := account.Cipher.(*AEADCipher)
|
||||
ivLen = aeadCipher.IVSize()
|
||||
iv := bs[:ivLen]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue