Skip to content

Add WebSocket client replay - #8443

Open
m-jay21 wants to merge 6 commits into
mitmproxy:mainfrom
m-jay21:feat/websocket-client-replay
Open

m-jay21 wants to merge 6 commits into
mitmproxy:mainfrom
m-jay21:feat/websocket-client-replay

Conversation

@m-jay21

@m-jay21 m-jay21 commented Sep 20, 2026

Copy link
Copy Markdown

Summary

  • Extend clientplayback to replay saved WebSocket flows after a successful HTTP upgrade
  • Replay recorded client messages in order, waiting for matching server replies before the next client frame (naive sync from Add WebSocket Client Replay #5248)
  • Handle binary messages, close frames (including abnormal closes), and failed/incomplete upgrades; add tests and CHANGELOG entry

Closes #5248

Test plan

  • uv run pytest test/mitmproxy/addons/test_clientplayback.py --cov=mitmproxy.addons.clientplayback --cov-fail-under=100
  • uv run tox -e lint
  • Replay a captured WebSocket flow against a live server and confirm client/server message ordering
  • Confirm a failed WebSocket upgrade (non-101) finishes like normal HTTP client replay

Signed-off-by: mohammad junayd <111487869+m-jay21@users.noreply.github.com>
Signed-off-by: mohammad junayd <111487869+m-jay21@users.noreply.github.com>
Signed-off-by: mohammad junayd <111487869+m-jay21@users.noreply.github.com>
Signed-off-by: mohammad junayd <111487869+m-jay21@users.noreply.github.com>
Signed-off-by: mohammad junayd <111487869+m-jay21@users.noreply.github.com>
Signed-off-by: mohammad junayd <111487869+m-jay21@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add WebSocket Client Replay

1 participant