mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-30 05:38:37 +00:00
SS2022 proxy: Refinements & fixes (#7488)
https://github.com/XTLS/Xray-core/pull/7194#issuecomment-6250856095 Closes https://github.com/XTLS/Xray-core/issues/7486 --------- Co-authored-by: Roman Rublev <roman171107@gmail.com>
This commit is contained in:
@@ -337,7 +337,7 @@ func WriteTCPRequest(w io.Writer, method *CipherMethod, pskList [][]byte, dest n
|
||||
addrPortLen := AddrPortLength(dest)
|
||||
varHeaderLen := addrPortLen + 2 + paddingLen + payloadLen
|
||||
|
||||
totalHandshakeLen := int32(method.KeySaltLength + len(pskList)*AESBlockSize + RequestHeaderFixedChunkLength + AEADTagSize + varHeaderLen + AEADTagSize)
|
||||
totalHandshakeLen := int32(method.KeySaltLength + (len(pskList)-1)*AESBlockSize + RequestHeaderFixedChunkLength + AEADTagSize + varHeaderLen + AEADTagSize)
|
||||
handshakeBuf := buf.NewWithSize(totalHandshakeLen)
|
||||
defer handshakeBuf.Release()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user