1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-02-05 07:45:23 -05:00

refine dispatcher

This commit is contained in:
Darien Raymond
2016-11-13 14:33:00 +01:00
parent 5dc05d6352
commit 9471b5b066
13 changed files with 31 additions and 27 deletions

View File

@@ -285,6 +285,7 @@ func (this *Server) handleSocks4(clientAddr v2net.Destination, reader *v2io.Buff
session := &proxy.SessionInfo{
Source: clientAddr,
Destination: dest,
Inbound: this.meta,
}
log.Access(clientAddr, dest, log.AccessAccepted, "")
this.transport(reader, writer, session)
@@ -292,7 +293,7 @@ func (this *Server) handleSocks4(clientAddr v2net.Destination, reader *v2io.Buff
}
func (this *Server) transport(reader io.Reader, writer io.Writer, session *proxy.SessionInfo) {
ray := this.packetDispatcher.DispatchToOutbound(this.meta, session)
ray := this.packetDispatcher.DispatchToOutbound(session)
input := ray.InboundInput()
output := ray.InboundOutput()