users@tyrus.java.net

Re: Proxy bypassed on linux

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Fri, 23 Jan 2015 10:32:39 +0100

Hi Andrei,

both our transports (grizzly and jdk 7) do try to connect to proxy (when
set), but if the connection fails, it will continue trying with other
proxies. Ultimately it will hit the fallback, which is "direct
connection"; meaning that if you set "fake" proxy, it will fail, but
Tyrus will still try to connect to the host.

I guess we could introduce configurable option, which would try just the
first valid proxy and fail if we cannot connect to the proxy. Feel free
to file an enhancement request at https://java.net/jira/browse/TYRUS.

Interesting statement (for me) is that on windows, connection fails :-)
Can you please share the stack trace?

Regards,
Pavel

On 23/01/15 10:15, Andrei Nicolau wrote:
> Hello,
>
> I am trying to create a websocket client to connect to a server through
> a proxy.
> Everything works fine if the proxy is a valid one but whenever I use a
> fake proxy ( random ip / port ), instead of failing it still connects to
> the server.
>
> Did anyone encounter this issue and maybe knows a fix ?
>
> p.s. I've tested this on two linux machines and on a windows machine. On
> the windows machine it behaves as it should.