1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-03-22 14:15:55 -04:00

Fix compatibility with Actinium

This commit is contained in:
Darien Raymond
2016-12-13 10:45:21 +01:00
parent a9790d59f0
commit 76da31c755
5 changed files with 29 additions and 15 deletions

View File

@@ -92,7 +92,7 @@ func (v *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
v.responseHeader = buffer[33] // 1 byte
request.Option = protocol.RequestOption(buffer[34]) // 1 byte
padingLen := int(buffer[35] >> 4)
request.Security = protocol.Security(buffer[35] & 0x0F)
request.Security = protocol.NormSecurity(protocol.Security(buffer[35] & 0x0F))
// 1 bytes reserved
request.Command = protocol.RequestCommand(buffer[37])

View File

@@ -187,6 +187,7 @@ func (v *VMessInboundHandler) HandleConnection(connection internet.Connection) {
go func() {
bodyReader := session.DecodeRequestBody(request, reader)
if err := buf.PipeUntilEOF(bodyReader, input); err != nil {
log.Debug("VMess|Inbound: Error when sending data to outbound: ", err)
connection.SetReusable(false)
}
bodyReader.Release()
@@ -219,6 +220,7 @@ func (v *VMessInboundHandler) HandleConnection(connection internet.Connection) {
writer.SetCached(false)
if err := buf.PipeUntilEOF(output, bodyWriter); err != nil {
log.Debug("VMess|Inbound: Error when sending data to downstream: ", err)
connection.SetReusable(false)
}