mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-05 16:12:20 -08:00
Provide a shared TCP configuration helper for future DERP, control, and log-upload socket policy. Apply optional keepalive and user-timeout settings before protocol wrapping, and report each result independently so callers can choose whether to fall back or reject a connection. Add a checked user-timeout setter that validates duration bounds and reports unsupported platforms or sockets instead of silently succeeding. Preserve the existing best-effort APIs and all service defaults. Reuse net.TCPConn keepalive configuration; do not introduce RTO tuning or infer hardware offload support. Test actual Linux socket settings on dialed and accepted connections, zero-config behavior, invalid values, partial failures, and timeout reset. Updates tailscale/corp#50948 Change-Id: I8151ab81b8630610ba3ef2e2ec54b62caebadf65 Signed-off-by: James Tucker <[email protected]>