public static String getHttpProxyPassword( boolean considerBaseConfig ) { String result = System.getProperty( HTTP_PROXY_PASSWORD ); if ( considerBaseConfig && result == null ) { result = getProxyPassword(); } return result; }
public static String getFtpProxyPassword( boolean considerBaseConfig ) { String result = System.getProperty( FTP_PROXY_PASSWORD ); if ( considerBaseConfig && result == null ) { result = getProxyPassword(); } return result; }
/** * This method should be used everywhere instead of <code>URL.openConnection()</code>, as it copes with proxies that * require user authentication. This method will retrieve the configured password and user name. * * @param url * @return connection * @throws IOException */ public static URLConnection openURLConnection( URL url ) throws IOException { return openURLConnection( url, getProxyUser(), getProxyPassword() ); }
public static void logProxyConfiguration( Logger log ) { log.info( "- proxyHost=" + getProxyHost() + ", http.proxyHost=" + getHttpProxyHost( false ) + ", ftp.proxyHost=" + getFtpProxyHost( false ) ); log.info( "- proxyPort=" + getProxyPort() + ", http.proxyPort=" + getHttpProxyPort( false ) + ", ftp.proxyPort=" + getFtpProxyPort( false ) ); log.info( "- proxyUser=" + getProxyUser() + ", http.proxyUser=" + getHttpProxyUser( false ) + ", ftp.proxyUser=" + getFtpProxyUser( false ) ); log.info( "- proxyPassword=" + getProxyPassword() + ", http.proxyPassword=" + getHttpProxyPassword( false ) + ", ftp.proxyPassword=" + getFtpProxyPassword( false ) ); log.info( "- nonProxyHosts=" + getNonProxyHosts() + ", http.nonProxyHosts=" + getHttpNonProxyHosts( false ) + ", ftp.nonProxyHosts=" + getFtpNonProxyHosts( false ) ); }