Expand description
WebSocket proxy handler for frame-level inspection.
This module provides WebSocket frame inspection by intercepting data in Pingora’s body filters after a 101 upgrade. Frames are parsed from the byte stream, sent to agents for inspection, and filtered based on agent decisions.
§Architecture
After a 101 upgrade, Pingora treats the bidirectional data as “body” bytes.
We intercept these in request_body_filter (client→server) and
response_body_filter (server→client), parse WebSocket frames, and
apply agent decisions.
Client → [body_filter] → Frame Parser → Agent → Forward/Drop/Close
↓
Server ← [body_filter] ← Frame Parser ← Agent ← Forward/Drop/CloseStructs§
- Close
Reason - Reason for closing the WebSocket connection
- WebSocket
Handler - WebSocket frame handler for body filter integration.
- WebSocket
Handler Builder - Builder for WebSocketHandler
Enums§
- Process
Result - Result of processing WebSocket data
Traits§
- Frame
Inspector - Trait for WebSocket frame inspection.