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
feat: persist DevTunnel ID for stable URLs across restarts (#13)
* feat: persist DevTunnel ID for stable URLs across restarts
Tunnel ID is saved to ~/.termbeam/tunnel.json and reused on next
startup. Tunnel is no longer deleted on shutdown — only the host
process is stopped. Add --new-tunnel flag to force a fresh tunnel.
Closes#10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: use --persisted-tunnel flag instead of changing --tunnel behavior
- --tunnel remains ephemeral (no breaking change) — creates fresh, deletes on exit
- --persisted-tunnel opts into persistence — saves ID, reuses across restarts, 30d expiry
- Removes --new-tunnel flag (use --tunnel for a fresh one instead)
- Ephemeral tunnels are deleted on shutdown, persisted ones are preserved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: log tunnel mode and expiry in startup banner
Shows 'ephemeral (expires in 1 day)' or 'persisted (expires in 30 days)'
next to the public URL so users know what to expect.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: prevent hang on shutdown with tunnel cleanup
Remove detached:true from tunnel host spawn so the child process
dies with the parent. Remove process.on('exit') handler that called
execSync (which can't run in exit handlers), causing the hang.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: prevent hang on ephemeral tunnel cleanup
Use SIGKILL (Unix) / taskkill /T /F (Windows) to force-kill the host
process tree before running devtunnel delete. Add 10s timeout to the
delete command so it can't hang indefinitely.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: close server and WebSocket on shutdown to prevent hang
Close HTTP server and WebSocket server before exiting so all handles
are released. Add shuttingDown guard to prevent double-shutdown.
Use unref'd timeout as force-exit safety net.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The `--tunnel` flag creates a public URL using [Azure DevTunnels](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/):
71
+
The `--tunnel` flag creates an ephemeral public URL using [Azure DevTunnels](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/):
71
72
72
73
```bash
73
74
termbeam --tunnel --password mysecret
74
75
```
75
76
77
+
For a **stable URL** that persists across restarts, use `--persisted-tunnel`:
78
+
79
+
```bash
80
+
termbeam --persisted-tunnel --password mysecret
81
+
```
82
+
83
+
!!! info "Persisted vs Ephemeral Tunnels"
84
+
- `--tunnel` — Creates a fresh tunnel each time, deleted on shutdown. Good for one-off use.
85
+
- `--persisted-tunnel` — Saves the tunnel ID to `~/.termbeam/tunnel.json` and reuses it across restarts (30-day expiry). The URL stays the same so you can bookmark it on your phone. To get a fresh URL, just switch back to `--tunnel`.
86
+
76
87
!!! warning
77
88
Always use a password when using `--tunnel`. The tunnel URL is publicly accessible.
0 commit comments