Skip to content

Commit

Permalink
allow job-level override
Browse files Browse the repository at this point in the history
  • Loading branch information
jsboak committed Jun 10, 2024
1 parent 9721f4c commit 2c3cc84
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,19 @@ 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");

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();
}
Expand Down

0 comments on commit 2c3cc84

Please sign in to comment.