El 18/01/14 22:11, Yuri Z escribió: > Hi > I have an old issue with waveinabox.net - for some reason the browser can > connect only via socket.io fallback. I think it happened since the > following settings were added. > > # A optional host:port address on which to listen for websocket connections. > # If no value is set for http_websocket_public_address it defaults to the > first address specified > # by http_frontend_public_address. > # Default value: localhost:9898 > http_websocket_public_address = @HTTP_WEBSOCKET_PUBLIC_ADDRESS@ > > # An optional host:port address for which the client is told to attempt > websocket connections. > # If no value is set for http_websocket_presented_address it defaults to > http_websocket_public_address > # Default value: localhost:9898 > http_websocket_presented_address = @HTTP_WEBSOCKET_PRESENTED_ADDRESS@ > > I am not sure if it's something wrong on the server side - maybe firewall > settings, or something with incorrect configuration... > Does anyone has these settings configured right on non local environment? > Would be nice to see an example. >
It seems to me that the code of webclient in waveinabox.net maybe it's outdated from upstream. Socket.io was only used as a fallback if websocket does not work. More info: http_websocket_public_address just add an new IP to listen to, if you don't use it, all traffic will go to the same IP. Anyway, a running configuration. We use cloudflare CDN in kune.cc, but, cloudflare does not support websockets so we have configured one IP with normal traffic that can run via proxy (and benefit from cache, protect from attacks, etc), and other different IP for the websocket traffic (same situation cant appy if you use mod-proxy in apache, etc). So: wave_server_domain = kune.cc (...) http_websocket_public_address = www.kune.cc:80 # This use cloudflare CDN / IPs $ host kune.cc kune.cc has address 162.159.247.26 kune.cc has address 162.159.246.26 (...) # The websocket domain is direct connected to our server without proxies $ host www.kune.cc www.kune.cc has address XX.XX.XX.XX You can have more complex scenarios with a server without public IPs, using NAT and port redirections, so you can configure the server to listen to some local IP for websocket connections. But the client should connect to another real public ip via http_websocket_presented_address. I hope it helps. With more info can I try to help you more. -- Vicente J. Ruiz Jurado