Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1075

Make proxy configuration logic and settings clearer and more in line with Java conventions



    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 2.0.0
    • Component/s: jclouds-core
    • Labels:


      From the description of https://github.com/jclouds/jclouds/pull/914:

      In the absence of any special jclouds.*proxy* settings, jclouds should respect the normal JVM conventions for proxy detection, such as the java.net.httpProxyHost property. For it to default to no proxy, unlike everything else in java, is surprising. Previously jclouds only looked for the JVM proxy if jclouds.use-system-proxies was set, and then in a cumbersome way:

      • jclouds.use-system-proxies tried to set java.net.useSystemProxy but that is read once at startup and subsequently ignored by the JVM so it had little effect
      • so the effect of jclouds.use-system-proxies was effectively to tell jclouds to use the default proxy chosen by the JVM looking at the java.net.* properties, not necessarily the OS proxy referred to by java.net.useSystemProxy
      • the default value of jclouds.use-system-proxies was taken from java.net.useSystemProxy and so while that succeeds in causing java.net.useSystemProxy to take effect, it was succeeding in a strange accidental way: the only way for the normal java.net.httpProxyHost and others to take effect was to set jclouds.use-system-proxies=true but make sure java.net.useSystemProxy=false

      This adds explicit control over whether the JVM default proxy is usable (true by default), and switches the precedence so that if a user specifies a jclouds.proxy-host then it is used – irrespective of whether any other system proxies or jvm proxies are specified.

      I think this is more what a user would expect if they do need to set special proxy settings for jclouds to use. More importantly in most cases they can now just set JVM proxy settings and the right thing will happen.


        1. JCLOUDS-1075.patch
          16 kB
          Andrew Phillips



            • Assignee:
              andrewp Andrew Phillips
              andrewp Andrew Phillips
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: