1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

enable pading for cfb

This commit is contained in:
Darien Raymond 2017-11-23 15:21:57 +01:00
parent 4aa87be0f2
commit 3ed16fad38
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -80,10 +80,6 @@ func (c *ClientSession) EncodeRequestHeader(header *protocol.RequestHeader, writ
buffer.AppendBytes(c.responseHeader, byte(header.Option))
padingLen := dice.Roll(16)
if header.Security.Is(protocol.SecurityType_LEGACY) {
// Disable padding in legacy mode for a smooth transition.
padingLen = 0
}
security := byte(padingLen<<4) | byte(header.Security)
buffer.AppendBytes(security, byte(0), byte(header.Command))