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:
风扇滑翔翼
2026-11-26 21:09:53 +00:00
committed by GitHub
co-authored by Roman Rublev
parent 67756b3674
commit db6664bd68
10 changed files with 381 additions and 271 deletions
+1 -1
View File
@@ -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()