VMess AEAD based packet length
(cherry picked from commit 08221600082a79376bdc262f2ffec1a3129ae98d)
This commit is contained in:
1 parent
707efd6d12
commit
ff35118af5
8 files changed
+232
-6
No files matched your search
@@ -7,6 +7,8 @@ import (
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
|
||||
"github.com/xtls/xray-core/common/crypto"
|
||||
|
||||
"golang.org/x/crypto/sha3"
|
||||
)
|
||||
|
||||
@@ -116,3 +118,11 @@ func (s *ShakeSizeParser) NextPaddingLen() uint16 {
|
||||
func (s *ShakeSizeParser) MaxPaddingLen() uint16 {
|
||||
return 64
|
||||
}
|
||||
|
||||
type AEADSizeParser struct {
|
||||
crypto.AEADChunkSizeParser
|
||||
}
|
||||
|
||||
func NewAEADSizeParser(auth *crypto.AEADAuthenticator) *AEADSizeParser {
|
||||
return &AEADSizeParser{crypto.AEADChunkSizeParser{Auth: auth}}
|
||||
}
|
||||
Reference in new issue
Block a user