In my web application I use Node.js and Socket.io.
As I testet the application local or in my wifi network everything was fine but since I switched to mobile data I get the connection error:
WebSocket connection to 'ws://url/socket.io/1/websocket/' failed: Error during WebSocket handshake: Unexpected response code: 502
It seems that my mobile provider is blocking the ports 8080 and 80 but switching to another port seems not possible with nodejitsu.
Has someone some experience how to handle mobile network, node.js and socket.io?
EDIT:
As host I tried a free subscription of Heroku and a free subscription of Nodejitsu.
On mobile I checked the ports on http://websocketstest.com/ with mobile and wifi. On mobile the test failed with the ports 80 and 8080.
I thought maybe I could change the port to 443 but nodejitsu seems to listen to port 80 even if I set server.listen()
to port 443.
I think WebSockets could be possible maybe via another port but I don't know how to change the port or why nodejitsu for example is just listening to port 80.