Did anynone succeeded in using HttpURLConnection to connect to an
address belonging to an address range supposed to bypass proxy (as
defined in " System Preferences > Network > Advanced > Proxies >
Bypass proxy settings for these Hosts & Domains") ?
It seems that HttpURLConnection ignores the system proxy "bypass"
settings and always try to connect to the proxy, even if the host
address is defined in the "bypass" field.
I am facing this problem on Mac OS X 10.5 on both Java 5 and 6.
I tried several solutions but all failed :
1) call System.setProperty("http.proxyHost", "<none>"). Also tried
"none" or "".
2) call System.setProperty("http. nonProxyHosts", "my.webserver.com")
3) call System.setProperty("java.net.useSystemProxies", "false")
4) use my own implementation of ProxySelector that returns a list of
only one Proxy.NO_PROXY element in the "select" method
5) create instances of HttpURLConnection with Proxy.NO_PROXY
parameter, like this :
URL url = new URL("http://my.webserver.com/");
URLConnection conn = url.openConnection(Proxy.NO_PROXY);
6) played with "Network Settings" in the "Java Preferences" utility
and tried "Use proxy server" (instead of "Use system settings") and
All of these attempts failed. Attempt 1) bypassed the proxy indeed but
tried to connect to the address "<none>" or "none", which of course
didn't work. All other attempts resulted in tring to connect to the
I am probably doing something wrong but I can't see what. Could this
be a Java Mac OS X specific issue ? Is there a known workaround ?
Thanks in advance for your help.
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden