Hello,
I am using squid proxy server (Squid Cache: Version 3.3.8) and my java application is behind the squid proxy server.
My java application contains web socket connection call to the target.
When I start my java application,it try to connect to the target via the proxy using the web socket and it is get connected, but as soon as it get connected and got the response from the target server for first time squid is closing my web socket connection.
I am using HTTPS(443) for the web socket connection.
following is my web socket connection java code:
MultiMap requestHeaders = new CaseInsensitiveHeaders(); //it contains my authentication parameters
HttpClientOptions httpOptions = new HttpClientOptions().setDefaultPort(443).setSsl(true).setKeepAlive(true).setProtocolVersion(HttpVersion.HTTP_1_1);
HttpClient client = Vertx.createHttpClient(httpOptions);//http client creation
client.websocket(443), "
test.example.com","/app/websocket/connection", requestHeaders, new WebSocketHandler(), new Handler<Throwable>() {
@Override
public void handle(Throwable event) {
System.out.println("error in web socket connection")
}
});
Note: In WebSocketHandler() I have implemented all my web socket handlers.
can anyone help me out to solve this.
I need persistent web socket connection with my target server.
Thanks and regards,
Somnath