Deepak Joy Cheenath
Deepak Joy Cheenath

Reputation: 6006

How to block Websocket protocol (to simulate corporate firewalls) on Ubuntu?

I am working on a web app that uses WebSockets, and I know that many corporate firewalls block it. Now I have added Socket.io to fallback to XHR polling in case Websockets are blocked.

But I can't figure out how to simulate this environment for testing. How can I simulate an environment similar to corporate firewalls?

I am on Ubuntu 12.04, but can switch to Windows 7 if required. Am open to any different approaches as well.

Upvotes: 9

Views: 4395

Answers (2)

frodo2975
frodo2975

Reputation: 11725

I was able to get socket.io to error on websocket connect using Fiddler. In Filters, I set Delete response headers to delete the header Connection: Upgrade.

Upvotes: 2

Jasen
Jasen

Reputation: 12402

install squid and tell your browser to use it as a proxy.

Upvotes: 2

Related Questions