1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00

Handle multiple UDP packets in socks.

This commit is contained in:
V2Ray 2015-10-14 09:56:04 +02:00
parent 2a00e2c6e9
commit 1b80a1a85a

View File

@ -66,7 +66,7 @@ func (server *SocksServer) handlePacket(conn *net.UDPConn, packet v2net.Packet,
ray := server.vPoint.DispatchToOutbound(packet)
close(ray.InboundInput())
if data, ok := <-ray.InboundOutput(); ok {
for data := range ray.InboundOutput() {
response := &protocol.Socks5UDPRequest{
Fragment: 0,
Address: targetAddr,