.setHostnameVerifier(new AllowAllHostnameVerifier());
if (Boolean.parseBoolean(System.getProperty("defaultProxySet"))) {
httpClientBuilder.setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())).build();
} else if (Boolean.parseBoolean(System.getProperty("proxySet"))) {
HttpHost httpHost = new HttpHost(System.getProperty("http.proxyHost"), Integer.parseInt(System.getProperty("http.proxyPort")));
DefaultProxyRoutePlanner defaultProxyRoutePlanner = new DefaultProxyRoutePlanner(httpHost);
httpClientBuilder.setRoutePlanner(defaultProxyRoutePlanner).build();
} else {
HttpHost httpHost = new HttpHost("localhost", getProxyPort());
DefaultProxyRoutePlanner defaultProxyRoutePlanner = new DefaultProxyRoutePlanner(httpHost);
httpClientBuilder.setRoutePlanner(defaultProxyRoutePlanner);
}
return httpClientBuilder.build();
}