saucelabs / forwarder

Forwarder is a production-ready, fast MITM proxy with PAC support. It's suitable for debugging, intercepting and manipulating HTTP traffic. It's used as a core component of Sauce Labs Sauce Connect Proxy.
https://forwarder-proxy.io
Mozilla Public License 2.0
235 stars 13 forks source link

Websockets do not connect on first attempt on Firefox #938

Closed pulsejet closed 1 week ago

pulsejet commented 1 month ago

Expected Behavior

Websockets work

Actual Behavior

The first connection to websocket on loading a page fails, but the second one succeeds. Refresh the page and this happens again.

Steps to Reproduce the Problem

  1. Set up forwarder+proxy in Firefox
  2. Go to https://websocketking.com/
  3. Click "Connect". It fails.
  4. Click "Connect" again. It connects now.

Specifications

{A884EBF0-7BE3-4482-AC31-EE47BECE2D14} {7569F0A7-D266-4C1E-B044-C439FD8B109B} {A659E9BA-BD10-4D06-B9CD-8000CBB30911}

mmatczuk commented 1 month ago

Nice find. It works with MITM, it does not work without MITM.

mmatczuk commented 1 week ago

What happens is that the FF is interpreting the connect response as server response.

image