Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16291

Support automatic proxy configuration

XMLWordPrintable

      For installations using WPAD or otherwise where it would be awkward to statically configure a single proxy server, it would be desirable to support java.net.useSystemProxies as http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html describes.

      This would be an option in hudson.ProxyConfiguration, possibly requiring a restart once selected since this system property appears to be read just once when java.net classes are first used. When set, open and similar calls would just use java.net calls without further ado (in fact it is unclear why the current code does not simply set a ProxySelector and thus bypass the need for such methods).

      jenkins.plugins.asynchttpclient.AHCUtils would also need to take note of this field; if set, it would need to call java.net.ProxySelector to pick a proxy. It is unfortunately designed incorrectly in that it assumes a single proxy, whereas ProxySelector asks for a particular host and protocol, since it is common for corporate LANs to use proxies for some hosts but not others; may suffice to deprecate this simplistic method and for the benefit of old clients have it pick nowhere.net and HTTP as a typical pair.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: