1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 17:25:27 -05:00

2nd step to reduce number of authentication bits

This commit is contained in:
v2ray
2016-01-21 10:08:00 +01:00
parent 51695df239
commit f60747c455
4 changed files with 13 additions and 17 deletions

View File

@@ -138,8 +138,7 @@ func (this *VMessInboundHandler) HandleConnection(connection *net.TCPConn) error
// Optimize for small response packet
buffer := alloc.NewLargeBuffer().Clear()
defer buffer.Release()
buffer.AppendBytes(request.ResponseHeader[0] ^ request.ResponseHeader[1])
buffer.AppendBytes(request.ResponseHeader[2] ^ request.ResponseHeader[3])
buffer.AppendBytes(request.ResponseHeader, byte(0))
buffer.AppendBytes(byte(0), byte(0))
if data, open := <-output; open {