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:
@@ -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])
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user