feat: route Fleet SSH over existing Tailscale - #1
Merged
Merged
Conversation
Owner
Author
|
@greptile review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ssh <name>.localas the only normal Fleet SSH interface..localhost-key pin and OpenSSH authentication path.fleet connect <member> --via lan|tailscale.docs/tailscale-integration-spec.md.Verification
cargo test --all-targets(76 unit tests, 20 CLI tests)cargo clippy --all-targets -- -D warningsThe implementation deliberately does not install, authenticate, administer, or relay through Tailscale.
Greptile Summary
This PR adds optional Tailscale routing for Fleet SSH without installing or administering Tailscale. Fleet learns each member's Tailscale FQDN over the existing pinned SSH channel, stores only the FQDN (never IPs), and resolves it live through the captain's local Tailscale client at connect time.
fleet transport connectas an OpenSSHProxyCommandthat races LAN (150 ms head start) against the mapped Tailscale peer, passing the winning TCP socket to the outer SSH process unchanged.validate_join_sourceto enforce LAN-only joins and hardens the generated SSH config withPort 22,UpdateHostKeys no, and a shell-safe quotedProxyCommand.Confidence Score: 5/5
Safe to merge; all findings are diagnostic edge cases with no impact on correctness, data integrity, or security.
The transport selector, FQDN mapping, ProxyCommand generation, and join-source validation all implement their stated contracts correctly. The two flagged items — an uninformative error message when both routes time out simultaneously, and an opaque server error when OS interface enumeration fails during a join — degrade diagnostics only and do not cause incorrect behavior or security regression.
Files Needing Attention: src/ssh_client.rs (connect_auto error path) and src/service.rs (validate_join_source error propagation) are worth a second glance but neither requires a blocking fix.
Important Files Changed
Reviews (2): Last reviewed commit: "fix: address Tailscale transport review ..." | Re-trigger Greptile