mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
unix, udp: fixed nat issue (#194)
This commit is contained in:
1 parent
539f604e37
commit
10b7f2d5e6
6 files changed
+47
-37
No files matched your search
+1
-1
@@ -97,7 +97,7 @@ func (d *Direct) DialUDP(network, addr string) (net.PacketConn, net.Addr, error)
|
||||
// TODO: support specifying local interface
|
||||
var la string
|
||||
if d.ip != nil {
|
||||
la = d.ip.String() + ":0"
|
||||
la = net.JoinHostPort(d.ip.String(), "0")
|
||||
}
|
||||
|
||||
pc, err := net.ListenPacket(network, la)
|
||||
|
||||
Reference in new issue
Block a user