mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-01 08:17:25 +00:00
rewrite alloc.buffer
This commit is contained in:
@@ -62,7 +62,7 @@ func (v *DefaultDispatcher) DispatchToOutbound(session *proxy.SessionInfo) ray.I
|
||||
}
|
||||
|
||||
if session.Inbound != nil && session.Inbound.AllowPassiveConnection {
|
||||
go dispatcher.Dispatch(destination, alloc.NewLocalBuffer(32).Clear(), direct)
|
||||
go dispatcher.Dispatch(destination, alloc.NewLocalBuffer(32), direct)
|
||||
} else {
|
||||
go v.FilterPacketAndDispatch(destination, direct, dispatcher)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ func NewTestPacketDispatcher(handler func(destination v2net.Destination, traffic
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
traffic.OutboundOutput().Write(payload.Prepend([]byte("Processed: ")))
|
||||
payload.Prepend([]byte("Processed: "))
|
||||
traffic.OutboundOutput().Write(payload)
|
||||
}
|
||||
traffic.OutboundOutput().Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user