mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-18 23:00:12 +00:00
send reuse option in header
This commit is contained in:
1 parent
b9c88b673b
commit
72fb5a256c
6 files changed
+94
-14
No files matched your search
@@ -118,7 +118,9 @@ func (this *ClientSession) DecodeResponseHeader(reader io.Reader) (*protocol.Res
|
||||
return nil, transport.ErrorCorruptedPacket
|
||||
}
|
||||
|
||||
header := new(protocol.ResponseHeader)
|
||||
header := &protocol.ResponseHeader{
|
||||
Option: protocol.ResponseOption(buffer.Value[1]),
|
||||
}
|
||||
|
||||
if buffer.Value[2] != 0 {
|
||||
cmdId := buffer.Value[2]
|
||||
|
||||
@@ -159,7 +159,7 @@ func (this *ServerSession) EncodeResponseHeader(header *protocol.ResponseHeader,
|
||||
encryptionWriter := crypto.NewCryptionWriter(aesStream, writer)
|
||||
this.responseWriter = encryptionWriter
|
||||
|
||||
encryptionWriter.Write([]byte{this.responseHeader, 0x00})
|
||||
encryptionWriter.Write([]byte{this.responseHeader, byte(header.Option)})
|
||||
err := MarshalCommand(header.Command, encryptionWriter)
|
||||
if err != nil {
|
||||
encryptionWriter.Write([]byte{0x00, 0x00})
|
||||
|
||||
Reference in new issue
Block a user