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

lazy init of socks5 response

This commit is contained in:
V2Ray 2015-10-04 16:53:50 +02:00
parent 507da1a451
commit 1d1708ea3c

View File

@ -128,12 +128,11 @@ func (server *SocksServer) handleSocks5(reader *v2net.TimeOutReader, writer io.W
return err
}
response := protocol.NewSocks5Response()
if request.Command == protocol.CmdUdpAssociate && server.config.UDPEnabled {
return server.handleUDP(reader, writer)
}
response := protocol.NewSocks5Response()
if request.Command == protocol.CmdBind || request.Command == protocol.CmdUdpAssociate {
response := protocol.NewSocks5Response()
response.Error = protocol.ErrorCommandNotSupported