common/src/main/java/HTTPClient/HTTPConnection.java
/**
     * Determines if the given host matches any entry in the non-proxy list.
     *
     * @param host the host to match - must be trim()'d and lowercase
     * @return true if a match is found, false otherwise
     * @see #dontProxyFor(java.lang.String)
     */
Determines if the given host matches any entry in the non-proxy list.
@param host the host to match - must be trim()'d and lowercase
@return true if a match is found, false otherwise
@see #dontProxyFor(java.lang.String)
Determines if the given host matches any entry in the non - proxy list . @param host the host to match - must be trim () ' d and lowercase @return true if a match is found false otherwise @see #dontProxyFor ( java . lang . String )
private boolean matchNonProxy(String host)
    {
	if (non_proxy_host_list.get(host) != null)
	    return true;
	for (int idx=0; idx<non_proxy_dom_list.size(); idx++)
	    if (host.endsWith(non_proxy_dom_list.elementAt(idx)))
		return true;
	if (non_proxy_addr_list.size() == 0)
	    return false;
	InetAddress[] host_addr;
	try
	    { host_addr = InetAddress.getAllByName(host); }
	catch (UnknownHostException uhe)
	    { return false; }	
	for (int idx=0; idx<non_proxy_addr_list.size(); idx++)
	{
	    byte[] addr = non_proxy_addr_list.elementAt(idx);
	    byte[] mask = non_proxy_mask_list.elementAt(idx);
	    ip_loop: for (int idx2=0; idx2<host_addr.length; idx2++)
	    {
		byte[] raw_addr = host_addr[idx2].getAddress();
		if (raw_addr.length != addr.length)  continue;
		for (int idx3=0; idx3<raw_addr.length; idx3++)
		{
		    if ((raw_addr[idx3] & mask[idx3]) != (addr[idx3] & mask[idx3]))
			continue ip_loop;
		}
		return true;
	    }
	}
	return false;
    }
private boolean matchNonProxy ( String host ) { if ( non_proxy_host_list . get ( host ) != null ) return true ; for ( int idx = 0 ; idx < non_proxy_dom_list . size ( ) ; idx ++ ) if ( host . endsWith ( non_proxy_dom_list . elementAt ( idx ) ) ) return true ; if ( non_proxy_addr_list . size ( ) == 0 ) return false ; InetAddress [ ] host_addr ; try { host_addr = InetAddress . getAllByName ( host ) ; } catch ( UnknownHostException uhe ) { return false ; } for ( int idx = 0 ; idx < non_proxy_addr_list . size ( ) ; idx ++ ) { byte [ ] addr = non_proxy_addr_list . elementAt ( idx ) ; byte [ ] mask = non_proxy_mask_list . elementAt ( idx ) ; ip_loop : for ( int idx2 = 0 ; idx2 < host_addr . length ; idx2 ++ ) { byte [ ] raw_addr = host_addr [ idx2 ] . getAddress ( ) ; if ( raw_addr . length != addr . length ) continue ; for ( int idx3 = 0 ; idx3 < raw_addr . length ; idx3 ++ ) { if ( ( raw_addr [ idx3 ] & mask [ idx3 ] ) != ( addr [ idx3 ] & mask [ idx3 ] ) ) continue ip_loop ; } return true ; } } return false ; }
Determines if the given host matches any entry in the non-proxy list.
Determines if the given host matches any entry in the non - proxy list .
// Check host name list // Check domain name list // Check IP-address and subnet list // maybe the proxy has better luck