Using Gostly

WebSocket capture

Retain frames from routed WebSocket connections for observation while the proxy forwards the conversation. Capture supports the plain proxy path and the intercepted TLS path when their respective setup is enabled.

Enable frame capture

Frame capture is off by default. An operator sets ENABLE_WS_CAPTURE=true in .env, then runs docker compose up -d to recreate the proxy.

Both supplied Compose files (Full and Lite) pass this variable to ghost-proxy. In a Compose file you maintain yourself, add it to the ghost-proxy.environment map. For encrypted traffic, configure the separate TLS interception path and its client trust requirements.

Check that the selected service has traffic capture enabled and that the capture directory and mounted storage agree between the proxy and API. Frame retention uses the shared capture sink; it is not a separate WebSocket replay library.

What is retained

  • Routed frames are retained only when the global opt-in and the service's capture switch both permit it.
  • Text content is retained as text. Binary content is base64 encoded.
  • Recorded frame URIs omit the query string.
  • Archived or deleted services stop recording frames.

The per-service writer is bounded. A full capture queue can drop recorded frames while forwarding continues, so retained frames are not guaranteed to form a complete transcript. Unrouted frames on the TLS interception listener are forwarded and counted without persistence.

Review the stream before opting in

Frame bodies do not have per-frame redaction. HTTP credential-header redaction does not scrub sensitive values carried inside a message. Keep frame capture disabled for streams whose contents you cannot retain, and treat capture storage as recorded application data.

Capture scope

The mock cascade does not replay WebSocket conversations. Frame capture also does not provide deterministic episode execution for a WebSocket workflow. Test connection behavior, message handling and application state at the boundaries your own client or protocol harness controls.

A successful HTTP replay and a retained WebSocket frame are different forms of evidence. Verify the actual routed connection before relying on a capture for an investigation.