This is a fairly common problem, but I can not find a solution for my specific case. I am using Glassfish 4.1.1 and my application implements Websockets.
On the client side, I connect to the WS server simply:
var serviceLocation = "ws://" + window.location.host + window.location.pathname + "dialog/"; var wsocket = new WebSocket(serviceLocation + token_var);
On server-side websites, @ServerEndpoint functions are implemented and looks very common:
@ServerEndpoint(value = "/dialog/{token}", decoders = DialogMessageDecoder.class) public class DialogWebsoketEndpoint { @OnOpen public void open(final Session session, @PathParam("token") final String token) { ... } etc. }
Everything works fine until the client tries to connect using a proxy. Using this test: http://websocketstest.com/ I found that the client computer is running http-proxy 1.1. It cannot connect to websites, they simply do not work at all. wsoscket.readyState will never become 1.
How to configure my ServerEndpoint so that this code works even when a client connects using a proxy?
Thank you in advance!
UPDATE: I would provide a screenshot with websocketstest on this computer: 
On my computer, this is similar, except for one: HTTP proxy: no.
java javascript proxy websocket glassfish
Luxor
source share