wgengine/netstack: use system dialer to contact servers on localhost

Updates #504

Updates #707

Signed-off-by: Naman Sood <mail@nsood.in>
pull/1432/head
Naman Sood 4 years ago
parent 7461dded88
commit d01c60dad5

@ -350,7 +350,8 @@ func (ns *Impl) forwardTCP(client *gonet.TCPConn, wq *waiter.Queue, port uint16)
} }
cancel() cancel()
}() }()
server, err := ns.DialContextTCP(ctx, net.JoinHostPort("localhost", strconv.Itoa(int(port)))) var stdDialer net.Dialer
server, err := stdDialer.DialContext(ctx, "tcp", net.JoinHostPort("localhost", strconv.Itoa(int(port))))
if err != nil { if err != nil {
ns.logf("netstack: could not connect to local server on port %v: %v", port, err) ns.logf("netstack: could not connect to local server on port %v: %v", port, err)
return return

Loading…
Cancel
Save