- Remove INFERRED_CONNECT_MS: tunnelConnected is now only set true when
cloudflared logs 'Registered tunnel connection' — never inferred from
process uptime.
- Add four independent health dimensions:
cloudflaredRunning — child process alive/exited
tunnelConnected — actual cloudflared connection registered
originHealthy — http://127.0.0.1:18484/ reachable (polled every 20s)
publicEndpointStatus — diagnostic only, never triggers restart
- Add checkOriginHealth(): polls 127.0.0.1:18484 with explicit IPv4
(family:4) to avoid Windows localhost/IPv6 ambiguity.
- Restart cloudflared ONLY on process exit. A public 502/503/504/530
is never a restart trigger.
- Add 90s startup connection timeout: logs 'degraded' warning with full
diagnostics if no connection registered, but does NOT kill the process.
- Improve structured [Tunnel] logging: clearly distinguishes origin,
process, connection, and public endpoint health in every log line.
- Token: never log the full value; log first 6 chars only as proof of
configuration. Fail fast with clear error if token is missing.
- Duplicate process guard: explicit log when skipping a second spawn.
- start_tunnel.bat: add prominent warning not to run while backend is
active; suppress token echo; add --no-autoupdate flag.