Skip to content

tailcat: recover client dials after a server restart - #209

Open
yudongyouqing wants to merge 2 commits into
tailscale:mainfrom
yudongyouqing:fix/issue-159-server-restart
Open

yudongyouqing wants to merge 2 commits into
tailscale:mainfrom
yudongyouqing:fix/issue-159-server-restart

Conversation

@yudongyouqing

Copy link
Copy Markdown

Summary

  • Re-register tailcat forward clients every 30 seconds so a server that restarts with the same keys can rebuild its peer state while the client is idle.
  • Bound dial attempts and re-register on timeout. Acknowledgments from the configured server schedule a fresh WireGuard handshake before waking the dialer and trigger another endpoint advertisement.
  • Serialize client close with lazy startup and keep upstream's meow instance IDs so restarted clients still invalidate stale direct paths.

Fixes #159.

Testing

  • go build ./... and go vet ./... on the submitted commit.
  • Ran the four new tests plus TestClientRestartSameKey and TestAllowClient on Windows with -race -tags ts_omit_useproxy. All six passed.
  • The pre-rebase Windows full-suite run reported two SSH assertions affected by local PowerShell OSC output. The same output failures were reproduced on the clean baseline.

Bound TCP dial attempts and re-register with the server on timeout. Use each server acknowledgment to schedule a WireGuard handshake and refresh the client endpoints. Enable periodic re-registration for forward and cover both recovery paths with restart tests.

Fixes tailscale#159

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cmd/tailcat: a long-lived forward never re-registers, so new connections hang silently after the server restarts

1 participant