wgengine/netstack: use system dialer to contact servers on localhost
Updates #504 Updates #707 Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
7461dded88
commit
d01c60dad5
|
@ -350,7 +350,8 @@ func (ns *Impl) forwardTCP(client *gonet.TCPConn, wq *waiter.Queue, port uint16)
|
|||
}
|
||||
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 {
|
||||
ns.logf("netstack: could not connect to local server on port %v: %v", port, err)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue