code: public HttpClient createClient(int maxConnPerRoute, int connTimeoutMillis, int soTimeoutMillis, @Nullable String proxyHostAnPort) {
  		Registry<ConnectionSocketFactory> defaultRegistry = RegistryBuilder
  			.<ConnectionSocketFactory> create()
  			.register("http", PlainConnectionSocketFactory.getSocketFactory())
  			.register("https", SSLConnectionSocketFactory.getSocketFactory())
  			.build();
  		PoolingHttpClientConnectionManager connMgr = new PoolingHttpClientConnectionManager(defaultRegistry);
  			connMgr.setDefaultMaxPerRoute(maxConnPerRoute);
  		RequestConfig rCfg = RequestConfig.custom()
  			.setConnectTimeout(connTimeoutMillis)
  			.setSocketTimeout(soTimeoutMillis)
  			.build();
  		HttpClientBuilder hcb = HttpClientBuilder.create()
  			.setConnectionManager(connMgr)
  			.setDefaultRequestConfig(rCfg);
  		if (proxyHostAnPort == null) {
  			// do something?
  		} else if("jvm".equalsIgnoreCase(proxyHostAnPort)) {
  			SystemDefaultRoutePlanner rp = new SystemDefaultRoutePlanner(ProxySelector.getDefault());
  			hcb.setRoutePlanner(rp);
  		} else {
  			String[] hostAndPort = proxyHostAnPort.split(":");
  			Check.illegalargument.assertTrue(hostAndPort.length < 3, "wrong hostAndPort:"+proxyHostAnPort);
  			String host = hostAndPort[0];
  			int port = 80;
  			if (hostAndPort.length > 1) {
  				port = Integer.valueOf(hostAndPort[1]);
  			}
  			HttpHost proxy = new HttpHost(host, port);
  			hcb.setProxy(proxy);
  		}
  		HttpClient httpClient = hcb.build();
  		return httpClient;
  	}
docs: if proxyHostAnPort value is jvm the normal jvm settings apply