diff --git a/common/protocol/headers.go b/common/protocol/headers.go index 83a5fdd6d..007ff5aa4 100644 --- a/common/protocol/headers.go +++ b/common/protocol/headers.go @@ -38,6 +38,8 @@ const ( RequestOptionChunkMasking bitmask.Byte = 0x04 RequestOptionGlobalPadding bitmask.Byte = 0x08 + + RequestOptionEarlyChecksum bitmask.Byte = 0x16 ) type RequestHeader struct { diff --git a/proxy/vmess/encoding/server.go b/proxy/vmess/encoding/server.go index 00cb31394..318326a5e 100644 --- a/proxy/vmess/encoding/server.go +++ b/proxy/vmess/encoding/server.go @@ -126,7 +126,7 @@ func parseSecurityType(b byte) protocol.SecurityType { func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.RequestHeader, error) { buffer := buf.New() behaviorRand := dice.NewDeterministicDice(int64(s.userValidator.GetBehaviorSeed())) - DrainSize := behaviorRand.Roll(3266) + 16 + 38 + dice.Roll(behaviorRand.Roll(64)) + DrainSize := behaviorRand.Roll(3266) + 16 + 38 + dice.Roll(behaviorRand.Roll(64)+1) readSizeRemain := DrainSize drainConnection := func(e error) error {