AndrewBelt / hack.chat

a minimal, distraction-free chat application
https://hack.chat/
MIT License
2.39k stars 338 forks source link

Switch to wrapper library for websockets with fallback. #58

Open tracker1 opened 9 years ago

tracker1 commented 9 years ago

It would be nice to see a switch to a websocket wrapper such as socket.io, sockjs/shoe or another option in order to allow for users behind proxies or in older browser to use the application.

Related to #56

AndrewBelt commented 9 years ago

I'm actually curious how firewalls are able to detect whether a connection is WebSocket or HTTP, particularly WSS and HTTPS. To my understanding, a TLS session is made on port 443, and what happens inside isn't known to a firewall (unless it re-signs the session). Perhaps it detects in/out behavior or times out faster than normal.

It looks like these solutions are designed for old browsers, so while they may fix the problem, maybe there's a way to add compatibility settings to the nginx configuration as long as browsers support WebSockets.

tracker1 commented 9 years ago

There are plenty of corporate environments I've worked in where even HTTPS/TLS trafic is proxied (internal ca on all internal machiens)... so even HTTPS is an issue... (American Express, Wells Fargo, US Airways, and a few others from my own experience)

So, even then it's very useful... did some tests about a year and a half ago that showed less than half of the users of the site I was working on could use websockets (for whatever reason). Honestly, it may not be an issue for plenty of people, but given there have been requests/issues related, it may be worth at least looking into.

Another advantage, is you get socket reconnects in the box.