Skip to content
Hoody.com

The Hoody Tunnel kit exposes endpoints for inspecting and managing active tunnel sessions. The kit multiplexes port-forwarding traffic between containers and the broader Hoody runtime. Use these endpoints to monitor health, enumerate active sessions and bindings, scrape Prometheus metrics, and terminate problematic sessions.

The WebSocket control plane uses a subprotocol-negotiated binary protocol (hoody-tunnel.v1 or hoody-tunnel.v2); the REST endpoints below are for introspection and administration only.

All endpoints are served from the container-scoped URL https://{projectId}-{containerId}-tunnel-1.{serverName}.containers.hoody.icu.


Returns the standard kit health snapshot. No authentication is required.

This endpoint takes no parameters.

Terminal window
curl https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/health

Returns Prometheus text-format metrics for scraping, including active session count, active binding count, and file-descriptor permits available.

This endpoint takes no parameters.

Terminal window
curl https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/metrics

Returns all active tunnel sessions with their bindings, stream counts, and protocol version.

This endpoint takes no parameters.

Terminal window
curl https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/sessions

DELETE /api/v1/tunnel/sessions/{session_id}

Section titled “DELETE /api/v1/tunnel/sessions/{session_id}”

Terminates an active tunnel session. The kit sends a GOAWAY(0x0001, "closed by admin") frame on the live WebSocket and force-closes the connection after grace_ms. Admin kills are non-resumable: orphan parking is skipped.

NameInTypeRequiredDescription
session_idpathstringYesSession ID as returned by GET /api/v1/tunnel/sessions
grace_msqueryintegerNoGOAWAY drain budget in ms (05000, default 50)
Terminal window
curl -X DELETE \
"https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/sessions/sess_abc123def456?grace_ms=250"

Returns all active EXPOSE and PULL bindings across every session, with their owning session, port, kind, mode, and bind ID.

This endpoint takes no parameters.

Terminal window
curl https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/bindings

Returns a unified view of every active tunnel session with its expose and pull bindings broken out separately, plus stream counts, orphan count, and FD budget status.

This endpoint takes no parameters.

Terminal window
curl https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/tunnels

WebSocket upgrade endpoint for the multiplexed tunnel session. Clients MUST request subprotocol hoody-tunnel.v1 or hoody-tunnel.v2 and send a HELLO frame as the first binary message. See the kit README for the full wire protocol.

This endpoint takes no parameters.

Terminal window
curl -i \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
-H "Sec-WebSocket-Protocol: hoody-tunnel.v2" \
https://prj_alpha-ctnr_7f3b-tunnel-1.us-east-1.containers.hoody.icu/api/v1/tunnel/connect