class HttpClientFactoryImpl implements HttpClientFactory {

    private static OkHttpClient createClient(HttpClientConfig config) {
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        if (config.proxySettings().isProxyUse()) {
            Proxy proxy = createProxy(config.proxySettings());
            builder.proxy(proxy);
        }
        if (unverifiedSSLCertificate()) {
            builder.hostnameVerifier((s, sslSession) -> true);
        }
        return builder.build();
    }

}