1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-26 09:25:23 +00:00

fix tcp connection source

This commit is contained in:
Darien Raymond 2017-01-29 07:58:29 +01:00
parent e9600f0aa5
commit 19ca32efd7
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -50,6 +50,7 @@ func (w *tcpWorker) callback(conn internet.Connection) {
}
ctx = proxy.ContextWithAllowPassiveConnection(ctx, w.allowPassiveConn)
ctx = proxy.ContextWithInboundDestination(ctx, v2net.TCPDestination(w.address, w.port))
ctx = proxy.ContextWithSource(ctx, v2net.DestinationFromAddr(conn.RemoteAddr()))
w.proxy.Process(ctx, v2net.Network_TCP, conn)
cancel()
conn.Close()