Skip to content

Tailscale HTTPS still can't be turned on without first turning on Network access (follow-up to #18753) #26136

Open

Description

@jlipworth

#18753 was accepted with this fix scope: "the row should say why [detection was skipped] … and/or offer an explicit on-demand 'Check for Tailscale' action." #18758 shipped the text change only. So a user who already has MagicDNS and HTTPS set up, and wants tailnet HTTPS without exposing the backend on LAN/Tailscale IPs, still has to:

  1. Turn on Network access (which binds 0.0.0.0 and needs a relaunch).
  2. Turn on Tailscale HTTPS.
  3. Turn Network access back off (another relaunch).

Repro (desktop): fresh settings, Tailscale running with MagicDNS and HTTPS enabled. Go to Settings → Connections. The Tailscale HTTPS row says "Turn on Network access to detect Tailscale." and has no switch.

Expected: Tailscale HTTPS can be turned on directly while Network access stays off. The detection only happens after the user takes an explicit action, so there's still no privacy prompt by default.

Why this is small: the backend already supports Serve without Network access.

  • setTailscaleServeEnabled (apps/desktop/src/backend/DesktopServerExposure.ts:512) doesn't depend on mode. tailscale serve proxies to loopback (packages/tailscale/src/tailscale.ts:437).
  • Once tailscaleServeEnabled is true, getAdvertisedEndpoints (DesktopServerExposure.ts:556) runs detection, and the web UI keeps the HTTPS endpoint visible when Network access is off (ConnectionsSettings.tsx:618).

The only blocker is that renderTailscaleRow (apps/web/src/components/settings/ConnectionsSettings.tsx:907) renders the switch only when tailscaleHttpsEndpoint exists, and it can't exist until detection is on. #15027 doesn't cover this: its showSwitch: endpoint !== null || serveEnabled is still false in this state.

Suggested fix: when detection was skipped (missingTailscaleEndpointDescription's skipped case in ConnectionsSettings.logic.ts:62), still render the switch. Turning it on opens the existing setup dialog with no endpoint. The dialog already falls back to "Pending MagicDNS endpoint" (ConnectionsSettings.tsx:1430). Confirming calls setTailscaleServeEnabled({ enabled: true, port }). That makes detection run, so any macOS prompt follows an explicit user action, which is what #2745 wants. No contract change.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions