|
|
@ -122,7 +122,7 @@ public class TbHttpClient { |
|
|
SslContext sslContext = config.getCredentials().initSslContext(); |
|
|
SslContext sslContext = config.getCredentials().initSslContext(); |
|
|
httpClient = httpClient.secure(t -> t.sslContext(sslContext)); |
|
|
httpClient = httpClient.secure(t -> t.sslContext(sslContext)); |
|
|
} |
|
|
} |
|
|
} else if (!config.isUseSimpleClientHttpFactory()) { |
|
|
} else if (config.isUseSimpleClientHttpFactory()) { |
|
|
if (CredentialsType.CERT_PEM == config.getCredentials().getType()) { |
|
|
if (CredentialsType.CERT_PEM == config.getCredentials().getType()) { |
|
|
throw new TbNodeException("Simple HTTP Factory does not support CERT PEM credentials!"); |
|
|
throw new TbNodeException("Simple HTTP Factory does not support CERT PEM credentials!"); |
|
|
} |
|
|
} |
|
|
@ -347,8 +347,7 @@ public class TbHttpClient { |
|
|
Properties properties = System.getProperties(); |
|
|
Properties properties = System.getProperties(); |
|
|
if (properties.containsKey(HTTP_PROXY_HOST) || properties.containsKey(HTTPS_PROXY_HOST)) { |
|
|
if (properties.containsKey(HTTP_PROXY_HOST) || properties.containsKey(HTTPS_PROXY_HOST)) { |
|
|
createHttpProxyFrom(option, properties); |
|
|
createHttpProxyFrom(option, properties); |
|
|
} |
|
|
} else if (properties.containsKey(SOCKS_PROXY_HOST)) { |
|
|
if (properties.containsKey(SOCKS_PROXY_HOST)) { |
|
|
|
|
|
createSocksProxyFrom(option, properties); |
|
|
createSocksProxyFrom(option, properties); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|