diff --git a/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java b/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java index a3e218a..261484c 100644 --- a/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java +++ b/src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java @@ -110,13 +110,6 @@ public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws Ce httpClientBuilder.setSSLHostnameVerifier(new NoopHostnameVerifier()); httpClientBuilder.setSSLContext(sslContextBuilder.build()); } - if(options.containsKey("proxySettings") && Boolean.parseBoolean(options.get("proxySettings").toString())){ - log.log(5, "proxy IP set in job: " + options.get("proxyIP").toString()); - - HttpHost proxy = new HttpHost(options.get("proxyIP").toString(), Integer.valueOf((String)options.get("proxyPort")), "http"); - httpClientBuilder.setProxy(proxy); - } - if(options.get("useSystemProxySettings").equals("true")) { log.log(5, "Using proxy settings set on system"); @@ -124,6 +117,12 @@ public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws Ce httpClientBuilder.setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())); } + if(options.containsKey("proxySettings") && Boolean.parseBoolean(options.get("proxySettings").toString())){ + log.log(5, "proxy IP set in job: " + options.get("proxyIP").toString()); + + HttpHost proxy = new HttpHost(options.get("proxyIP").toString(), Integer.valueOf((String)options.get("proxyPort")), "http"); + httpClientBuilder.setProxy(proxy); + } return httpClientBuilder.build(); }