mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
send request without waiting for the first packet.
This commit is contained in:
parent
86f97616fc
commit
f0c1695db4
@ -176,14 +176,9 @@ func (this *SocksServer) handleSocks5(reader *v2net.TimeOutReader, writer io.Wri
|
|||||||
}
|
}
|
||||||
|
|
||||||
dest := request.Destination()
|
dest := request.Destination()
|
||||||
data, err := v2net.ReadFrom(reader, nil)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Info("TCP Connect request to %s", dest.String())
|
log.Info("TCP Connect request to %s", dest.String())
|
||||||
|
|
||||||
packet := v2net.NewPacket(dest, data, true)
|
packet := v2net.NewPacket(dest, nil, true)
|
||||||
this.transport(reader, writer, packet)
|
this.transport(reader, writer, packet)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -242,12 +237,7 @@ func (this *SocksServer) handleSocks4(reader io.Reader, writer io.Writer, auth p
|
|||||||
}
|
}
|
||||||
|
|
||||||
dest := v2net.NewTCPDestination(v2net.IPAddress(auth.IP[:], auth.Port))
|
dest := v2net.NewTCPDestination(v2net.IPAddress(auth.IP[:], auth.Port))
|
||||||
data, err := v2net.ReadFrom(reader, nil)
|
packet := v2net.NewPacket(dest, nil, true)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
packet := v2net.NewPacket(dest, data, true)
|
|
||||||
this.transport(reader, writer, packet)
|
this.transport(reader, writer, packet)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user