Compare commits

...

1 Commits

Author SHA1 Message Date
James Tucker
900b64403d 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>
2025-01-21 13:19:58 -08:00

View File

@@ -475,7 +475,8 @@ func proxyTCPConn(c net.Conn, dest string) {
},
}
p.AddRoute(addrPortStr, &tcpproxy.DialProxy{
Addr: fmt.Sprintf("%s:%s", dest, port),
Addr: fmt.Sprintf("%s:%s", dest, port),
KeepAlivePeriod: time.Second,
})
p.Start()
}