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

DefaultProxySelector should use system defaults on Windows, MacOS and Gnome

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u112, 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b156
    • OS:
      generic
    • Verification:
      Verified

      Backports

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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: