users@tyrus.java.net

Re: Support for Proxy in WebSocket API

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Fri, 04 Apr 2014 10:17:30 +0200

Hello Priya,

WebSocket spec does not support that in any way, but Tyrus
implementation does.

If you are using system-wide proxy settings (-Dhttp.proxyHost
-Dhttp.proxyPort), it should be picked up automatically or you can use
Tyrus specific approach to set it up:

     final ClientManager client = ClientManager.createClient();
*client.getProperties().put("org.glassfish.tyrus.client.proxy",
"http://**my.proxy.com**:80");*
     final Session session = client.connectToServer(...);

if you are on WLS, the property structure is little bit different;
you'll need to use weblogic.websocket.client.PROXY_HOST and
weblogic.websocket.client.PROXY_PORT.

Regards,
Pavel


On 03/04/14 23:53, priyam80us_at_gmail.com wrote:
> Does WebSocket Support setting proxy while opening up a connection with
> WebSocket EndPoint and while establishing handshake request.
>
> If so can you please point me to a sample ?
>
>