mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-01 00:33:43 +00:00
cmd/natc: send TCP keepalives to upstreams
Idle connections may silently close, detect those closures with TCP keeliave. Updates tailscale/corp#25169 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
parent
51adaec35a
commit
900b64403d
@ -476,6 +476,7 @@ func proxyTCPConn(c net.Conn, dest string) {
|
|||||||
}
|
}
|
||||||
p.AddRoute(addrPortStr, &tcpproxy.DialProxy{
|
p.AddRoute(addrPortStr, &tcpproxy.DialProxy{
|
||||||
Addr: fmt.Sprintf("%s:%s", dest, port),
|
Addr: fmt.Sprintf("%s:%s", dest, port),
|
||||||
|
KeepAlivePeriod: time.Second,
|
||||||
})
|
})
|
||||||
p.Start()
|
p.Start()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user