Repository navigation
Advertise Tailscale Serve HTTPS startup URLs - #2835
johnlombardo-dev wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces new user-facing behavior by changing how startup URLs are advertised based on Tailscale Serve configuration. New features that modify runtime behavior shown to users warrant human review. You can customize Macroscope's approvability policy. Learn more. |
|
Closing as part of backlog cleanup: this PR is stale, currently conflicting with main, has no approval, and has not had active remediation for 30+ days. If the change is still relevant, please rebase onto current main and request reopening or submit a focused current diff. Thank you for the contribution. |
Related to #2834
Summary
--tailscale-serve-host/T3CODE_TAILSCALE_SERVE_HOSTfor explicit MagicDNS host overridesNotes
I saw the project note that PRs are not currently being accepted, so this is offered as a small implementation reference for the linked feature request. Please feel free to use, adapt, or ignore it.
Validation
bun fmtbun lintbun typecheckbunx vitest run --reporter=verboseinapps/serverNote
Advertise Tailscale Serve HTTPS URLs at server startup
resolveAdvertisedStartupBaseUrlin startupAccess.ts that builds an HTTPS Tailnet base URL when Tailscale Serve is configured, using either an explicit--tailscale-serve-hostflag or MagicDNS name fromtailscale status.TailscaleServeRuntimein tailscaleServeRuntime.ts, a coordination service using aDeferred<boolean>to signal whether Tailscale Serve was configured successfully during server startup.--tailscale-serve-hostCLI flag andT3CODE_TAILSCALE_SERVE_HOSTenv var to override the advertised hostname.Macroscope summarized 4c019e8.
Note
Medium Risk
Changes what users see for pairing and browser open URLs when Tailscale Serve is enabled; misconfiguration could point clients at the wrong host, but failures fall back to HTTP.
Overview
When
--tailscale-serveis enabled, startup and headless pairing output can now advertise an HTTPS Tailnet base URL instead of only the local HTTP bind address.The server adds
resolveAdvertisedStartupBaseUrl, which waits on a newTailscaleServeRuntimesignal (Serve setup succeeded or not), then builds the URL from--tailscale-serve-host/T3CODE_TAILSCALE_SERVE_HOSTor from MagicDNS viatailscale status, with fallback to the existing HTTP URL if Serve or discovery fails. Headless connection strings, pairing URLs, and browser startup targets use that advertised URL.Config and docs cover the new host override and MagicDNS discovery behavior.
Reviewed by Cursor Bugbot for commit 4c019e8. Bugbot is set up for automated code reviews on this repo. Configure here.