Skip to content

hqsh 0.3.0: Tailscale routing (--tailscale auto|on|off) - #5

Merged
ralyodio merged 3 commits into
mainfrom
feat/tailscale-0.3.0
Oct 6, 2026
Merged

ralyodio merged 3 commits into
mainfrom
feat/tailscale-0.3.0

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Anthony: "it needs to support tailscale optional (if detected)". Also bumps to 0.3.0, the release with #3 (systemd/launchd) and #4 (Windows).

  • --tailscale auto|on|off (-t, --tailscale=, or $HQSH_TAILSCALE; default auto).
  • When it applies: if tailscale status --json reports Running and the host matches an online peer (machine name, MagicDNS name, tailnet IP, or what ssh -G resolves the alias to), ssh gets -o HostName=<tailnet IPv4> and -o HostKeyAlias=<real host>. ssh config still supplies user, port and keys, and known_hosts still applies.
  • What it never does: match a public name, or an alias that resolves to one, to a peer. Offline peers are ignored.
  • Fallback: a first connection that fails over the tailnet retries the normal route. Reconnects during an outage alternate between the two. on requires the tailnet and errors clearly when Tailscale is not running or the host is not a peer.
  • Help text and README updated (Tailscale, Windows hosts, HQSH_SHELL); version 0.3.0.

Tests

  • Peer matching (10 cases), route modes, a stopped or absent Tailscale, the ssh argv, and fallback/alternation.
  • By hand on dev2 (Tailscale there is NeedsLogin): auto stays quiet, and --tailscale on fails with "Tailscale is not running here".

🤖 Generated with Claude Code

ralyodio and others added 3 commits October 6, 2026 19:15
…ale auto|on|off)

When Tailscale is running here and the host matches an online peer (machine
name, MagicDNS name, tailnet IP, or what the ssh alias resolves to), ssh gets
-o HostName=<tailnet IP> and -o HostKeyAlias=<the real host>, so ssh config
still supplies user, port and keys and known_hosts still applies. A first
connection that fails over the tailnet falls back to the normal route;
reconnects alternate between the two unless --tailscale on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ralyodio
ralyodio merged commit e99724c into main Oct 6, 2026
5 checks passed
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.

1 participant