Skip to content

The Hoody Tunnel service exposes the management surface for the hoody-tunnel kit. Use these endpoints to inspect active tunnel sessions, expose and pull bindings, stream counts, FD budget, health, and Prometheus metrics, and to administratively terminate sessions. The WebSocket control plane endpoint is documented separately at the bottom of this page.

Standard kit health endpoint. Returns runtime information about the tunnel process including status, build, start time, memory, file descriptor count, PID, IP, and user agent. No authentication is required.

This endpoint takes no parameters.

Terminal window
curl https://tunnel.example.com/api/v1/tunnel/health

Returns Prometheus text-format metrics for the tunnel kit. Exposes active session count, active binding count, and available FD permits. Intended for scraping by a Prometheus server.

This endpoint takes no parameters.

Terminal window
curl https://tunnel.example.com/api/v1/tunnel/metrics

Lists all active tunnel sessions with their bindings, stream counts, and protocol version. Use this to discover live sessions, inspect the V1/V2 protocol in use, and see how many connections and streams each session has open.

This endpoint takes no parameters.

Terminal window
curl https://tunnel.example.com/api/v1/tunnel/sessions

Lists all active EXPOSE and PULL bindings across every session, with the owning session ID, port, kind, mode, and bind ID. Use this when you need a flat, cross-session view of port bindings.

This endpoint takes no parameters.

Terminal window
curl https://tunnel.example.com/api/v1/tunnel/bindings

Returns a unified overview of all active tunnels: sessions with their expose and pull bindings broken out, total stream and binding counts, orphan count, and remaining FD budget. Use this as a single-call dashboard for tunnel fleet health.

This endpoint takes no parameters.

Terminal window
curl https://tunnel.example.com/api/v1/tunnel/tunnels

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

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

Administratively terminates an active tunnel session. The kit sends a GOAWAY(0x0001, "closed by admin") frame on the WebSocket and force-closes the session after the grace_ms drain window. Admin kills skip the orphan-parking path, so the session is not resumable.

NameInTypeRequiredDescription
session_idpathstringYesSession ID as returned by GET /sessions
grace_msqueryintegerNoGOAWAY drain budget in ms (0–5000, default 50)
Terminal window
curl -X DELETE \
"https://tunnel.example.com/api/v1/tunnel/sessions/sess_abc123def456?grace_ms=200"

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 after the upgrade succeeds. See the kit README for the full wire protocol, frame types, and stream multiplexing rules.

This endpoint takes no parameters.

Terminal window
curl -i \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Protocol: hoody-tunnel.v2" \
https://tunnel.example.com/api/v1/tunnel/connect