mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
padding must be enabled when chunk masking is enabled
This commit is contained in:
parent
3b0bfe9422
commit
bf2d3890de
@ -87,10 +87,6 @@ func (v *Handler) Process(ctx context.Context, link *core.Link, dialer proxy.Dia
|
|||||||
Option: protocol.RequestOptionChunkStream,
|
Option: protocol.RequestOptionChunkStream,
|
||||||
}
|
}
|
||||||
|
|
||||||
if enablePadding {
|
|
||||||
request.Option.Set(protocol.RequestOptionGlobalPadding)
|
|
||||||
}
|
|
||||||
|
|
||||||
rawAccount, err := request.User.GetTypedAccount()
|
rawAccount, err := request.User.GetTypedAccount()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return newError("failed to get user account").Base(err).AtWarning()
|
return newError("failed to get user account").Base(err).AtWarning()
|
||||||
@ -102,6 +98,10 @@ func (v *Handler) Process(ctx context.Context, link *core.Link, dialer proxy.Dia
|
|||||||
request.Option.Set(protocol.RequestOptionChunkMasking)
|
request.Option.Set(protocol.RequestOptionChunkMasking)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if enablePadding && request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||||
|
request.Option.Set(protocol.RequestOptionGlobalPadding)
|
||||||
|
}
|
||||||
|
|
||||||
input := link.Reader
|
input := link.Reader
|
||||||
output := link.Writer
|
output := link.Writer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user