Skip to content

Feat/tailscale serve - #6

Merged
USCMig merged 8 commits into
mainfrom
feat/tailscale-serve
Aug 16, 2026
Merged

Feat/tailscale serve#6
USCMig merged 8 commits into
mainfrom
feat/tailscale-serve

Conversation

@USCMig

@USCMig USCMig commented Aug 16, 2026

Copy link
Copy Markdown
Owner

This manages the addition of a new way to setup hosting and communication of the frostd server on a Tailscale serve setup

USCMig and others added 8 commits August 4, 2026 05:07
Adds a "tailscale" coordinator_exposure variant alongside Direct URL,
Cloudflare Tunnel, and NGINX. Unlike the bundled cloudflared sidecar, this
detects and drives a system `tailscale` CLI (tailscale serve needs the
privileged tailscaled daemon and a logged-in tailnet, so it can't be a
sidecar).

Backend (src-tauri/src/tailscale.rs):
- `start` runs `tailscale serve --bg --https=443
  https+insecure://127.0.0.1:<port>`, putting the loopback frostd behind the
  machine's stable MagicDNS name on the tailnet with auto-provisioned public
  TLS. `https+insecure` is the tailnet equivalent of cloudflared's
  --no-tls-verify; frostd's Noise layer still authenticates end-to-end.
- Uses `serve` (tailnet-only), never `funnel` (public internet).
- MagicDNS name + readiness read from `tailscale status --json`; `available`
  / `detail` explain why it's not ready (not installed / signed out / offline
  / MagicDNS off). Binary resolved from PATH then per-OS install locations.
- `stop`/`stop_serve_blocking` turn off the 443 mapping (it lives in the
  daemon, not a child process) on stop, when the sidecar stops, and on app
  exit.
- Commands: start_tailscale_serve, stop_tailscale_serve, tailscale_status;
  AppState gains a `tailscale` handle.

Frontend (SessionSetup.tsx, ipc/commands.ts):
- Tailscale exposure tab + TailscaleExposure panel (serve/stop, shows the
  stable URL, guides install/sign-in via `detail`). The `.ts.net` URL is
  stable, so it saves and reuses like a normal server (not ephemeral).
- Participant server-URL guidance and cert notes mention the Tailscale form.

Backend builds, 2 new unit tests pass, tsc clean, no new clippy warnings.
Needs a live run on a Tailscale-signed-in machine to confirm the serve
invocation against the current CLI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
One check-off document covering both in-flight features, each part labelled
with the branch it needs (feat/sync-optimizations, feat/tailscale-serve).
Part A mirrors the pipelined-sync validation gate (stock-vs-pipelined
equality, incremental, cancel/resume, reorg, send-after-sync, flag-off
regression). Part B covers Tailscale detection states, publish, tailnet
reachability with no cert step, stable save/reuse, teardown on stop/quit,
tailnet-only scoping, and an end-to-end ceremony.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reduce the two Tailscale onboarding steps to buttons in the Tailscale exposure
panel:
- "Get Tailscale" (shown when the CLI isn't installed) opens
  https://tailscale.com/download in the system browser.
- "Sign in to Tailscale" (shown when installed but signed out) runs
  `tailscale up`, captures the login URL from its output, and opens it so the
  user can authenticate; the panel then auto-updates to the connected state via
  the existing status poll. If `up` needs elevated rights, that message is
  surfaced instead of hanging.

Backend: TailscaleStatus gains `installed` (CLI present regardless of sign-in)
so the UI can pick Get-Tailscale vs Sign-in; `tailscale::sign_in` spawns
`tailscale up`, extracts the login URL (bounded read, reaps in background); new
commands `tailscale_sign_in` and `open_url` (http(s)-only, OS default handler —
no deprecated shell API, no new plugin). Unit test for the login-URL parser.

UAT: docs/UAT.md Part B gains B1a (Get Tailscale opens the download page) and
B1b (Sign in drives `tailscale up` and the tab auto-updates), plus sign-off.

Backend builds, 3 tailscale tests pass, tsc clean, no new clippy warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	src-tauri/src/commands/server.rs
#	src-tauri/src/lib.rs
#	src/ipc/commands.ts
…in list

- Add a shared TailscalePanel and surface it under "Host a server here" on the
  1 · Setup → Server screen, alongside the Cloudflare tunnel option.
- Reuse the same panel in Session Configuration (drops the duplicated inline
  TailscaleExposure and its now-dead query/mutations).
- Stop swallowing browser-open failures: Get Tailscale / sign-in links now
  surface errors and always show a copyable fallback link.
- Rebuild the participant "I'm joining" URL examples as an aligned two-column
  grid instead of a <br>/&nbsp; blob.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Part B: note the two Tailscale entry points (Session Config + Server screen);
  add copyable-link fallback checks to B1a/B1b (the Get-Tailscale "nothing
  happens" fix); new B1c for the Server-screen Tailscale sub-section; new B8 for
  the cleaned-up participant "I'm joining" URL list.
- New Part C: in-app Diagnostics log card (Copy all / Refresh / Clear / Live),
  live-update, persistence boundary, and a no-secrets spot-check.

Steps verified against the actual UI (LogsCard labels, TailscalePanel states).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@USCMig
USCMig merged commit 966cd6b into main Aug 16, 2026
1 check 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