Skip to content

Support intercepting and simulating WebSocket traffic #1567

@waldekmastykarz

Description

@waldekmastykarz

Feature request

Description

Dev Proxy currently intercepts and simulates HTTP request/response traffic. It would be valuable to extend this capability to WebSocket connections, enabling developers to:

  • Intercept WebSocket observe and log WebSocket handshake, messages (both text and binary frames), and connection lifecycle eventsconnections
  • Simulate WebSocket mock WebSocket servers to return predefined messages, simulate delays, inject errors (e.g., unexpected disconnects, malformed frames), and test reconnection logicbehavior
  • Apply chaos testing to WebSocket randomly drop messages, introduce latency, or close connections to test application resiliencetraffic

Use cases

  • Testing real-time applications (chat, notifications, live dashboards) that rely on WebSocket connections
  • Simulating WebSocket API failures and edge cases without needing a live server
  • Validating client-side reconnection and error-handling logic

Considerations

  • Evaluate support in the underlying proxy engine (unobtanium-web-proxy) for WebSocket interception
  • Determine plugin API surface for WebSocket events (connect, message, close, error)
  • Consider configuration schema for defining WebSocket mock responses and chaos scenarios

Metadata

Metadata

Labels

needs specIssue needs specification

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions