1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-29 21:45:21 -05:00

Migrate VMessOut into protocol

This commit is contained in:
v2ray
2016-02-27 16:41:21 +01:00
parent ef51c600fb
commit 2144c47102
7 changed files with 94 additions and 112 deletions

View File

@@ -140,4 +140,10 @@ func (this *ServerSession) EncodeResponseHeader(header *protocol.ResponseHeader,
encryptionWriter := crypto.NewCryptionWriter(aesStream, writer)
this.responseWriter = encryptionWriter
encryptionWriter.Write([]byte{this.responseHeader, 0x00})
MarshalCommand(header.Command, encryptionWriter)
}
func (this *ServerSession) EncodeResponseBody(writer io.Writer) io.Writer {
return this.responseWriter
}