Enable system proxies by default on Linux?

Alan Bateman Alan.Bateman at oracle.com
Wed Sep 25 07:20:50 UTC 2019


On 24/09/2019 23:47, mark.reinhold at oracle.com wrote:
> Using network proxies with Java applications is still, after all these
> years, painful on Linux.
>
> Is there a reason not to change the default value of the system property
> `java.net.useSystemProxies` [1] to `true`?
This is a problematic area, I think Daniel Fuchs looked into it recently 
to see what should be changed.

One thing on Linux is that is that useSystemProxies will look for gconf 
or GNOME configuration. That seems legacy now and the JDK should 
probably be looking at the http_proxy and https_proxy env variables to 
be consistent with other tools.

I think the main issue with using system proxy configuration by default 
is testing the JDK. The macOS port is the one case where system proxies 
are used by default and it has been problematic to test when the proxy 
configuration on tests systems isn't setup correctly (the equivalent of 
noProxy in particular).

Another part to this is to enumerates the APIs and features that that 
could or should use the proxy configuration. The legacy URL protocol 
handlers for sure but there are other areas that might need attention.

-Alan


More information about the net-dev mailing list