mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-07-25 19:24:27 -04:00
don't read 0 bytes
This commit is contained in:
parent
8460d016ab
commit
30a0aa6fb0
@ -213,7 +213,7 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
if invalidRequest {
|
if invalidRequest {
|
||||||
randomLen := dice.Roll(32)
|
randomLen := dice.Roll(32) + 1
|
||||||
// Read random number of bytes for prevent detection.
|
// Read random number of bytes for prevent detection.
|
||||||
buffer.AppendSupplier(buf.ReadFullFrom(decryptor, randomLen))
|
buffer.AppendSupplier(buf.ReadFullFrom(decryptor, randomLen))
|
||||||
return nil, newError("invalid request")
|
return nil, newError("invalid request")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user