Closed Bug 1530684 Opened 7 years ago Closed 6 years ago

Update mitmproxy alternate server script to support WebSocket packages

Categories

(Testing :: Raptor, enhancement, P2)

Version 3
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1559110

People

(Reporter: Bebe, Assigned: Bebe)

References

Details

Currently we don't support this type of packages in mitmproxy

Because of this we can't replay https://hubs.mozilla.com/spES8RP/treasured-spirited-huddle

Assignee: nobody → alexandru.ionescu

tested this locally:

I managed to get it to work with 4.0.4 and adding "--set stream_websockets=True",

note:
you need server replay for 4.0.4 with no websockets changes

see
https://docs.mitmproxy.org/stable/overview-features/#websockets
https://docs.mitmproxy.org/stable/concepts-options/

bebe, what's the status of this?

Flags: needinfo?(fstrugariu)

More investigation and development is required here

Flags: needinfo?(fstrugariu)
Assignee: alexandru.ionescu → fstrugariu
Blocks: 1517799

:tarek do you have any experience with this?

Flags: needinfo?(tarek)

no, but I can probably help
In theory, mitmproxy should support the websocket protocol and do the right things.

what problem do you have?

Flags: needinfo?(tarek)

Adding this here also from bug 1517799
From my research:

  1. WPR does not support WebSockets. Tested using record/playback on http://websocket.org/echo.html
  2. MitmProxy partially supports WebSockets:
    1. Out of the box when we use a recording containing websockets mitm crashes: https://github.com/mitmproxy/mitmproxy/issues/3564
    2. We can implement a plugin for websockets similar with alternate-server-replay but we might hit some other issues: https://github.com/mitmproxy/mitmproxy/issues/3396

:Tarek we need a similar replay algorithm as the one for http in alternate-server-replay

MITM already has some WebSoket addon integration:
https://docs.mitmproxy.org/stable/addons-events/

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.