I have configured Firefox to use a proxy of mine for http and https. Yes, I write the code for the proxy myself so I'm in complete control there.
As you may know it's no longer possible to disable WebSocket in Firefox through about:config. I'm looking for a lightweight way of disabling it. If it's not possible at all in Firefox I've got to do something in my proxy.
Here's my question: When Firefox is configured to use an http proxy, does it ALWAYS send an http CONNECT request to the proxy to establish the WebSocket connection? What happens if my proxy returns HTTP/1.1 405 Method Not Allowed? Is that enough to convince Firefox to abandon WebSocket? Is there any chance that Firefox might bypass my proxy in WebSocket matters after such a response? After all, I haven't configured it to use my proxy for the ws or wss protocols. And ws/wss is NOT disabled in Firefox.
Does Firefox ever send the ws handshake to the proxy, i.e. no CONNECT?
This is about security. I need to make sure that no WebSocket communication slips through. At the same time I want to avoid overkill: No disabling of javascript, no disallowing certain web sites.
This might not answer your direct question, but I think it satisfies your goal.
You can still disable WebSockets by entering the URL about:config
and then searching for
network.websocket.max-connections
which you can set the value to 0 to prevent new WebSockets from being created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With