Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170868

DefaultProxySelector should use system defaults on Windows, MacOS and Gnome

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8u112, 9
    • core-libs
    • b156
    • generic
    • Verified

        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).

              simonis Volker Simonis
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: