inkbox-ai/inkbox/inkbox-tunnels
Claude Code and agent skill by inkbox-ai/inkbox
- community
Checking that the SKILL.md file is still in the repository.
Use when bringing a local server online behind a public Inkbox URL — covers Python, TypeScript, and Rust tunnel runtimes, edge vs passthrough TLS, forwarding, handlers, and local liveness.
Install
npx vskill@latest install inkbox-ai/inkbox/inkbox-tunnelsSKILL.md
Inkbox Tunnels
Inkbox Tunnels expose a process running on the developer's machine (or any POSIX host) at a public https://{handle}.inkboxwire.com URL. The SDK opens an outbound HTTP/2 connection to the data plane; inbound third-party traffic rides back over that same connection. No inbound port to open, no static IP needed.
Tunnels are an identity property: every agent identity owns exactly one tunnel, and tunnel_name == agent_handle. There is no standalone "create tunnel" call — the tunnel is provisioned atomically by inkbox.createIdentity(...). Pre-existing identities created before this rollout already have tunnels (the migration backfilled them).
Two TLS modes:
| Mode | Who terminates TLS | When to pick | |
|---|---|---|---|
edge (default) | Inkbox terminates at the edge, forwards plaintext requests as envelopes | Most apps. Simpler. The SDK sees parsed Requests / ASGI scopes. | |
passthrough | The SDK terminates TLS in your process | When customers must speak directly to your cert (mTLS, custom SNI), or when end-to-end encryption is a hard requirement. |
Both modes accept either a `forward_to` URL (proxy to a local HTTP server) or an in-process callable (Fetch handler in TS, ASGI app in Python). WebSocket upgrades work on either.
Platform: the Python tunnel runtime supports Linux, macOS, and native Windows on Python 3.11+. WSL is not required. Keep Python updated to the latest patch release and store tunnel state in a private user directory. The Rust tunnel runtime requires POSIX.
Authentication
The data plane authenticates with the same API key the SDK client was constructed with. Two options:
- Admin-scoped key — can connect any tunnel in the org.
- Identity-scoped key — only valid for the tunnel attached to its scoped identity.
For a fresh agent bootstrap, mint an identity-scoped key after createIdentity:
The legacy per-tunnel connect_secret is gone — there is nothing to print, persist, or rotate per tunnel. To revoke a tunnel's access, revoke the API key.
The key is resolved in order: the api_key= argument → the INKBOX_API_KEY env var → a ~/.inkbox/config file (api_key = ...). The file fallback is handy for background/agent processes that don't inherit the shell's env. The CLI resolves the same way (--api-key → INKBOX_API_KEY → ~/.inkbox/config).
Python
Install
macOS note: the python.org installer doesn't hook into the system keychain, so TLS to the data plane can fail withSSL: CERTIFICATE_VERIFY_FAILED. The SDK now falls back to certifi's CA bundle automatically; if you still hit it, setexport SSL_CERT_FILE=$(python -m certifi).
Forward to a local URL (edge mode)
Subsequent runs read ~/.inkbox/tunnels/{name}/state.json for cached tunnel-id / zone / public-host. The state file no longer holds a secret.
Forward to an in-process ASGI app (FastAPI, Starlette, …)
The runtime drives the ASGI app directly — no socket, no uvicorn needed. WebSocket scopes are supported the same way.
Passthrough TLS
The tunnel's tls_mode is fixed at create time. In passthrough mode the SDK auto-generates and signs a certificate via the control plane (stored under ~/.inkbox/tunnels/{name}/). The third party connects directly to that cert.
Async usage
wait()/close() and serve_forever()/aclose() are mutually exclusive — pick one pair.
Sample local liveness at any time with listener.status, listener.is_connected, and listener.last_connected_at. Status is idle, connecting, connected, reconnecting, closed, or superseded. The timestamp is an aware UTC datetime and remains available while reconnecting. These are local observations; listener.tunnel is the bootstrap resource snapshot. Status callbacks are edge-triggered and do not repeat reconnecting for each failed attempt in the same outage.
Control-plane reads + edit
There is no create, delete, restore, force_delete, or rotate_secret here — tunnel lifecycle is owned by create_identity / identity.delete() (which cascades).
Common connect() options
| kwarg | default | notes | |
|---|---|---|---|
pool_size | server-decided | parked-intake pool, 1–32 | |
state_dir | ~/.inkbox/tunnels/{name} | where state + passthrough cert live | |
on_status | None | callback for "connecting" / "connected" / "reconnecting" / "closed" / "superseded" | |
allow_remote_forwarding | False | bypass loopback-only allowlist for forward_to (review SSRF first) | |
forward_to_verify_tls | True | for https:// upstream forwards |
TypeScript
Install
Node ≥ 22, POSIX only. The data-plane subpath imports node:http2 / node:tls, so it's loaded from a separate entry — @inkbox/sdk itself stays browser-safe.
Forward to a local URL (edge mode)
Sample local liveness with listener.status, listener.isConnected, and listener.lastConnectedAt. The same six states as Python are exposed. The timestamp remains set while reconnecting, and listener.tunnel remains the bootstrap resource snapshot. serveForever() and wait() both reject on terminal authentication, takeover, or unexpected fatal errors. Status callbacks are edge-triggered and do not repeat a state until it changes.
In-process Fetch-API handler
req is a standard Web Request; ctx exposes signal, forwardedForIp, sniHost, and the read-only envelope.
In-process WebSocket handler
wsHandler requires either forwardTo or handler to be set as well — non-WS requests need a destination too.
Passthrough TLS
Control-plane reads + edit
Tunnels are provisioned atomically by inkbox.createIdentity(...); there is no standalone create / delete / restore / forceDelete / rotateSecret surface.
For in-process WebSockets, catch WsServerDraining (4500) for planned handoff and WsConnectionLost (1011) for cold connection loss. Both extend WsClosed and set reconnectAdvised = true. URL-forwarded WebSockets receive the same close codes on the local upstream leg.
Common connect() options
| option | default | notes | |
|---|---|---|---|
poolSize | server-decided | 1–32 | |
stateDir | ~/.inkbox/tunnels/{name} | state.json + passthrough cert | |
onStatus | — | "connecting" / "connected" / "reconnecting" / "closed" / "superseded" | |
allowRemoteForwarding | false | bypass loopback-only allowlist | |
forwardToVerifyTls | true | for https:// upstream forwards | |
forwardToCaBundle | — | extra CA(s) for upstream TLS verification | |
installSignalHandlers | true on main | clean shutdown on SIGINT/SIGTERM |
Rust
Enable the tunnels-runtime feature. Rust keeps a blocking connect API and does not create an OS thread; run it on a caller-owned thread. A cloneable TunnelStatusHandle provides the same local states:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/inkbox-tunnels/SKILL.md
Popularity
- Repository stars
- 100
- Repository forks
- 26
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/inkbox-ai/inkbox/inkbox-tunnels)