1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

Fix UDP addr

This commit is contained in:
V2Ray 2015-10-06 00:02:28 +02:00
parent 4aba285a99
commit 28386b077b

View File

@ -25,7 +25,7 @@ func (server *SocksServer) ListenUDP(port uint16) error {
log.Error("Socks failed to listen UDP on port %d: %v", port, err)
return err
}
udpAddress = v2net.IPAddress([]byte{127, 0, 0, 1}, port)
udpAddress = v2net.IPAddress(conn.LocalAddr().(*net.UDPAddr).IP, uint16(conn.LocalAddr().(*net.UDPAddr).Port))
go server.AcceptPackets(conn)
return nil