8

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.

Deepak Joy Cheenath
  • 5,796
  • 5
  • 25
  • 29
  • So I would simply run the app on an emulator and block the actual ports on my PC to simulate that environment on Ubuntu - sudo ufw enable - sudo ufw reject out {PORT} – 130nk3r5 Nov 28 '19 at 14:38

2 Answers2

2

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

Jasen
  • 11,837
  • 2
  • 30
  • 48
2

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.

frodo2975
  • 10,340
  • 3
  • 34
  • 41