You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
share_port: pre-flight check that the local port is listening, post-flight URL verification, and dryRun #58
The most common failure when sharing a dev server is that nothing is listening on the port yet, or the app is bound to an interface the Serve proxy can't reach. Today share_port happily creates the share and returns a URL that serves a 502. Then the agent tells the user "here's your link" and the user debugs it by hand. A pre-flight and post-flight check fits the project's "dry-run, structured, verified" identity (ROADMAP: no server offers stateful dry-run pre-flights).
Evidence
src/tools/share.ts:27-37 calls provider.serve and returns the URLs directly, with no check of the local port or the resulting endpoint.
Suggested approach
Pre-flight: before calling tailscale serve, try a TCP connect to 127.0.0.1:<port> (and ::1). If nothing answers, return a structured NOTHING_LISTENING warning (or an error, overridable with a force flag) with a remedy ("start your dev server first, or check it is bound to localhost").
Post-flight: after the share is created, do one HEAD/GET against the returned tailnet URL with a short timeout and report verified: true | false plus the status code. Skip this for Funnel unless asked, to avoid making public requests.
Activity