I had this question about using websockets behind a corporate firewall. We all know these will work on home internet connections and most cell phone networks.
This may be useful to anyone else figuring out how to best setup their B4J app and reaching corporate users.
First, I used the two following sites to test web sockets behind my test corporate network (a real client with a very robust firewall).
This will tell you right away what options are supported from the network you access the link from
https://websocketstest.com/
This allows you to configure a simple websocket based echo test using http or https
http://www.websocket.org/echo.html
In both cases I could connect to the web-sites (as you'd expect) but could not perform any websocket operations using standard http port 80.
The good news is that using https worked great in both cases.
My next test was to fire up the simple B4J Hello World App and try it myself (the app that adds two numbers). Fortunately this company doesn't block personal home cable internet connections. Connecting on port 51042 (the apps default port in the project) and port 80 connected to the web server with no issues. However hitting the "calc" button did nothing - it just stalled.
I figured I'd try using https (I opened up port 443 to my computer on my cable modem router). I tried simply using https://127.0.0.1 for kicks (I know it shouldn't work) and it didn't work. I obtained my hostname for public internet IP and tried https://myhomeip.provider.com - that didn't work either. It looks like B4J is rejecting because I haven't configured a proper SSL cert - so this is correct behaviour.
I'll get a cheap cert this weekend and configure it in my app. I suspect once properly configured SSL based web sockets should work just fine.
I'll post back to this thread so the next person looking this up may save some time.
This may be useful to anyone else figuring out how to best setup their B4J app and reaching corporate users.
First, I used the two following sites to test web sockets behind my test corporate network (a real client with a very robust firewall).
This will tell you right away what options are supported from the network you access the link from
https://websocketstest.com/
This allows you to configure a simple websocket based echo test using http or https
http://www.websocket.org/echo.html
In both cases I could connect to the web-sites (as you'd expect) but could not perform any websocket operations using standard http port 80.
The good news is that using https worked great in both cases.
My next test was to fire up the simple B4J Hello World App and try it myself (the app that adds two numbers). Fortunately this company doesn't block personal home cable internet connections. Connecting on port 51042 (the apps default port in the project) and port 80 connected to the web server with no issues. However hitting the "calc" button did nothing - it just stalled.
I figured I'd try using https (I opened up port 443 to my computer on my cable modem router). I tried simply using https://127.0.0.1 for kicks (I know it shouldn't work) and it didn't work. I obtained my hostname for public internet IP and tried https://myhomeip.provider.com - that didn't work either. It looks like B4J is rejecting because I haven't configured a proper SSL cert - so this is correct behaviour.
I'll get a cheap cert this weekend and configure it in my app. I suspect once properly configured SSL based web sockets should work just fine.
I'll post back to this thread so the next person looking this up may save some time.