void (@NotNull CredentialsProvider provider) { if (isHttpProxyEnabled() && isProxyAuthenticationEnabled()) { final String ntlmUserPassword = getProxyLogin().replace('\\', '/') + ":" + getProxyPassword(); provider.setCredentials(new AuthScope(getProxyHost(), getProxyPort(), AuthScope.ANY_REALM, AuthSchemes.NTLM), new NTCredentials(ntlmUserPassword)); provider.setCredentials(new AuthScope(getProxyHost(), getProxyPort()), new UsernamePasswordCredentials(getProxyLogin(), getProxyPassword())); } }