mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05: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 {
|
||||
randomLen := dice.Roll(32)
|
||||
randomLen := dice.Roll(32) + 1
|
||||
// Read random number of bytes for prevent detection.
|
||||
buffer.AppendSupplier(buf.ReadFullFrom(decryptor, randomLen))
|
||||
return nil, newError("invalid request")
|
||||
|
Loading…
Reference in New Issue
Block a user