========================================================
  AetherForge — Cloudflare Tunnel
  https://killa.thetempleofdoom.com -> localhost:8989
========================================================

AUTOMATIC — nothing to configure.

LAUNCH.bat opens a second window "AetherForge Tunnel" that:
  1. Finds cloudflared (bundled here or downloads if missing)
  2. Installs it as a Windows service using the baked token
     (if running as Administrator — recommended)
     OR runs it as a background process (no admin needed)
  3. Waits for killa.thetempleofdoom.com to respond
  4. Checks every 60 seconds and auto-restarts if tunnel drops

Log file: data\logs\tunnel.log

ROUTING
-------
Routing is managed in Cloudflare Zero Trust dashboard:
  Zero Trust > Networks > Tunnels > your tunnel
  > Public Hostname: killa.thetempleofdoom.com -> http://localhost:8989

The tunnel connector (cloudflared) connects this machine to Cloudflare.
The dashboard route tells Cloudflare where to send incoming traffic.
BOTH must be correct for the public URL to work.

VERIFY
------
When LAUNCH.bat is running, check tunnel window for:
  [TUNNEL][OK] OK  service=RUNNING  public=HTTP 200

Or manually:
  sc query cloudflared        <- should say STATE: 4  RUNNING
  curl https://killa.thetempleofdoom.com/

TROUBLESHOOTING
---------------
- Tunnel window says "Not running as Administrator":
    Right-click LAUNCH.bat > Run as administrator (once)
    Then future runs work with or without admin

- Service RUNNING but public URL fails:
    Check dashboard route: killa.thetempleofdoom.com -> http://localhost:8989
    Make sure AetherForge is running first (tunnel can't proxy dead origin)

- "cloudflared not found" — run pack-usb.bat on dev PC to rebundle

FILES
-----
  start-tunnel.ps1         <- main script (install + watchdog)
  tunnel-config.json       <- token, hostname, origin (edit to change)
  cloudflared.exe          <- bundled binary (~52 MB)
  cloudflared-windows-amd64.msi  <- MSI installer backup

========================================================
