erkyrath / tworld

A choice-based shared online text environment sandbox
MIT License
72 stars 13 forks source link

Some players have websocket problems #69

Open erkyrath opened 11 years ago

erkyrath commented 11 years ago

I was able to sign up, but when I log in I get “The connection to the server could not be opened.” on both Safari 5.1.9 and Firefox 20.0 on Mac OS X 10.6.8. I first thought it might be related to my Privoxy (HTTP proxy) or Little Snitch (reverse firewall), but it persisted when I disabled both. ... My earlier connection problems were indeed down to Privoxy, I had to completely take it out of the way rather than just disable its filtering. I can now connect with Firefox, however Safari still says The connection to the server could not be opened. (undefined,undefined) (but http://www.websocket.org/echo.html works).

erkyrath commented 11 years ago

Re the above: I think Mac Safari 6.0 is required. 5.x uses the "draft76" websocket protocol which is deprecated.

Switching to socket.io would work around this.

erkyrath commented 11 years ago

Various notes around the web confirm that Privoxy users should expect the websocket connection to fail.

erkyrath commented 11 years ago

At a minimum, have a better error message for the case of off-spec browsers.

erkyrath commented 10 years ago

User notes that he can reach http://www.websocket.org/echo.html only with "TLS mode" enabled. This makes sense; HTTPS requests bypass web proxies, right? Can we accept TLS connections?

erkyrath commented 10 years ago

socket.io 0.9 has no Tornado support? Maybe use https://github.com/sockjs/sockjs-client , http://github.com/mrjoes/sockjs-tornado/ instead?

erkyrath commented 10 years ago

Maybe I just need to provide an option for a wss: websocket URL. I think this requires SSL certs in the Tornado app:

ssl_options={
    "certfile": os.path.join(data_dir, "mydomain.crt"),
    "keyfile": os.path.join(data_dir, "mydomain.key"),
}
erkyrath commented 10 years ago

I have set up SSL access. Try this address: https://seltani.net/

The SSL certificate causes Firefox to cough up a warning about "unknown issuer". I'm using a free cert service, and I guess Firefox isn't entirely happy about that. It works if you accept the cert (add an exception about it in the warning dialog). Chrome and Safari don't complain.