JDK-8170868 : DefaultProxySelector should use system defaults on Windows, MacOS and Gnome
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 8u112,9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2016-12-07
  • Updated: 2023-09-18
  • Resolved: 2017-02-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b156Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Currently, DefaultProxySelector behaves differently on various platforms

On Windows, it only uses a manually configured proxy URL setting from the registry. If the system uses automatic configuration this will not be considered.

On Mac, the problem is similar. The VM reads the system wide proxy configuration on startup, but only if it uses a manually configured proxy host. Again, automatic proxy configuration through a PAC file or WPAD will be ignored.

On Linux, we already use libgio to get a potential list of proxies in cases where the user configured an automatic proxy configuration. But the native function Java_sun_net_DefaultProxySelector_getSystemProxy currently only returns the first entry of such a list although the public Java function sun.net.DefaultProxySelector.select() retuns a list of proxies.

This bug is for fixing Windows and MacOS to query the corresponding native APIs to get the "real" proxy hosts, even if the user configured automatic proxy configuration. It also fixes the native methods Java_sun_net_DefaultProxySelector_getSystemProxy to return the full list of proxies in cases where there is more than one proxy available (due to automatic configuration).
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/949799faf431 User: lana Date: 2017-02-08 19:31:50 +0000
08-02-2017

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/949799faf431 User: clanger Date: 2017-02-02 09:48:39 +0000
02-02-2017