final DefaultRemoteHttpProxySettings httpsProxy = new DefaultRemoteHttpProxySettings();
httpsProxy.setHostname("https-proxy");
httpsProxy.setPort(9090);
httpsProxy.setProxyAuthentication(new UsernamePasswordRemoteAuthenticationSettings("https-proxy", "https-pass"));
final DefaultRemoteProxySettings remoteProxySettings = new DefaultRemoteProxySettings();
remoteProxySettings.setHttpProxySettings(httpProxy);
remoteProxySettings.setHttpsProxySettings(httpsProxy);
customizer.applyProxyConfig(builder, remoteProxySettings);
final CredentialsProvider credentialsProvider = builder.getCredentialsProvider();