Inspect
WebSockets
Akev relays WebSocket traffic frame by frame and records every message. Open a WebSocket exchange in Traffic and pick the Messages tab: messages stream in live, with direction (↑ sent by the client, ↓ received from the server), time, type, size and a preview. Click a row to see the payload (JSON is pretty-printed, binary is shown as a hex dump).
Payloads are always readable: Akev removes the permessage-deflate offer from the handshake,
so messages are never compressed.
Sending messages
While a WebSocket is open, the Send a message panel under the list writes a message into the live connection:
- To server — the server receives it as if the client had sent it (masked like a client frame).
- To client — the client receives it as if the server had sent it.
- Type Text, JSON (checked before sending, sent exactly as typed), or a binary message
as Hex (
de ad be ef, separators and0xallowed) or Base64. - Send with Ctrl/⌘ Enter.
The message goes out between two messages of the real peer, never in the middle of one. It appears in the list with an injected tag; messages you sent are listed under Sent from Akev (click one to load it again). Connections answered by a WebSocket echo rule have no server, so only To client is available there.
WebSockets with injected or edited messages count as modified: filter Traffic with
is:websocket is:modified to find them.
Over the API: POST /api/exchanges/:id/messages with
{ "direction": "sent", "text": "{\"type\":\"ping\"}" } — see
API.md.
Pausing messages (WebSocket breakpoints)
A Pause WebSocket messages rule holds messages so you can change or stop them:
- Rules → New rule → Pause WebSocket messages (or pick the Pause messages action).
- Set the conditions for the WebSocket upgrade, e.g. Host equals
chat.example.com. - Choose which messages: Both directions, Sent (client → server) or Received (server → client), and optionally Only messages whose payload matches — contains, equals, starts/ends with or a regex, tested against the payload text.
Matching messages stop in the exchange's Messages tab, highlighted in amber below the list. Edit the payload (text, JSON or hex/base64 for binary) and choose:
- Forward (Ctrl/⌘ Enter) — sends it on; an unchanged message keeps its original framing, an edited one is recorded as modified.
- Drop — the message is never delivered.
- Forward all / Drop all when several are waiting.
The status bar and the navigation badge count paused messages, and a notification offers to jump to the WebSocket when you are looking elsewhere.
Good to know:
- Only the paused message's direction waits — the other direction keeps flowing, and pings and pongs still pass, so keep-alive timeouts don't fire while you edit.
- Messages behind a paused one wait in order and are checked against the rule in turn.
- Disabling or editing the rule takes effect immediately, also on connections that are already open. Match limit counts connections, not messages.
- If the client or server disconnects while a message is paused, the pause ends on its own: the message is delivered as received and nothing more is paused on that connection.
- Messages larger than 4 MiB are not paused.
Rules for WebSockets
Rules see the WebSocket upgrade request: use the Protocol condition (ws, wss) to target
WebSockets only. Besides pausing messages, WebSocket echo accepts the upgrade and echoes every
message back (no server needed) and WebSocket reject refuses it with an HTTP status. Map
remote forwards WebSockets to another server (http(s) targets become ws(s)). See
Rules.