@ -36,6 +36,7 @@ import (
"tailscale.com/hostinfo"
"tailscale.com/hostinfo"
"tailscale.com/internal/noiseconn"
"tailscale.com/internal/noiseconn"
"tailscale.com/ipn"
"tailscale.com/ipn"
"tailscale.com/net/netmon"
"tailscale.com/net/tsaddr"
"tailscale.com/net/tsaddr"
"tailscale.com/net/tshttpproxy"
"tailscale.com/net/tshttpproxy"
"tailscale.com/paths"
"tailscale.com/paths"
@ -850,6 +851,11 @@ func runTS2021(ctx context.Context, args []string) error {
logf = log . Printf
logf = log . Printf
}
}
netMon , err := netmon . New ( logger . WithPrefix ( logf , "netmon: " ) )
if err != nil {
return fmt . Errorf ( "creating netmon: %w" , err )
}
noiseDialer := & controlhttp . Dialer {
noiseDialer := & controlhttp . Dialer {
Hostname : ts2021Args . host ,
Hostname : ts2021Args . host ,
HTTPPort : "80" ,
HTTPPort : "80" ,
@ -859,6 +865,7 @@ func runTS2021(ctx context.Context, args []string) error {
ProtocolVersion : uint16 ( ts2021Args . version ) ,
ProtocolVersion : uint16 ( ts2021Args . version ) ,
Dialer : dialFunc ,
Dialer : dialFunc ,
Logf : logf ,
Logf : logf ,
NetMon : netMon ,
}
}
const tries = 2
const tries = 2
for i := range tries {
for i := range tries {