function FindProxyForURL(url, host)
{

//   return "DIRECT"; // bei massiven Proxy-Problemen

  // thp hat spezielle Lizenzen
    if (isInNet( myIpAddress(), "134.95.50.0", "255.255.255.0") ||
	isInNet( myIpAddress(), "134.95.51.0", "255.255.255.0") ||
	isInNet( myIpAddress(), "134.95.66.0", "255.255.255.0") ||
	isInNet( myIpAddress(), "134.95.67.0", "255.255.255.0") ||
	isInNet( myIpAddress(), "134.95.192.0", "255.255.255.0") ) {
	if ((host == "www.iop.org") ||
	    (host == "link.springer.de") ||
	    (host == "www.ed-phys.fr") ) {
	    return "DIRECT";
	};
    };

    if ( (url.length > 4000) || !isResolvable(host) ){
	return "DIRECT";
    };
    
    if (shExpMatch(url, "wais:*"))
    {
	return "DIRECT";
    };

    if ( isPlainHostName(host) ||			// lokal
         dnsDomainIs(host, "khm.de") ||
         dnsDomainIs(host, "mhs-koeln.de") ||
         dnsDomainIs(host, "WRat.de") ||
         dnsDomainIs(host, "dshs.de") ||
	 dnsDomainIs(host, "Uni-Koeln.DE") ||		// UKLAN nach Name
	 shExpMatch(host, "*//134.95.*") || 		// UKLAN nach IP
	 shExpMatch(host, "*//139.6.*") || 		// UKLAN nach IP
	 shExpMatch(host, "*//192.76.171.*") || 	// UKLAN nach IP
	 shExpMatch(host, "*//192.76.170.*") || 	// UKLAN nach IP
	 shExpMatch(host, "*//194.95.76.*") || 		// UKLAN nach IP
	 shExpMatch(host, "*//194.95.77.*") || 		// UKLAN nach IP
	 shExpMatch(host, "*//194.94.16.*") || 		// UKLAN nach IP
	 shExpMatch(host, "*//194.94.17.*") || 		// UKLAN nach IP
	 shExpMatch(host, "*//193.17.190.*") || 	// UKLAN nach IP
	 shExpMatch(host, "*//193.17.191.*") || 	// UKLAN nach IP
	 (host == "localhost") ||
         (host == "127.0.0.1") ||			// localhost
	 (url.indexOf("?") >= 0) ||			// Form o.ae.
//       shExpMatch(host, "*//*.de") ||              // Deutschland
//       shExpMatch(host, "*//*.DE") ||
	 shExpMatch(url, "http:*.asp") ||
	 shExpMatch(url, "http:*.cgi") ||
//	 shExpMatch(url, "http:*bin/*") ||
//	 shExpMatch(url, "http:*.cfm/*") ||
//	 shExpMatch(url, "http:*.dbm/*") ||
//	 shExpMatch(url, "http:*.dll/*") ||
//	 shExpMatch(url, "http:*.exe/*") ||
//	 shExpMatch(url, "http:*.hbs/*") ||
//	 shExpMatch(url, "http:*.idc/*") ||
	 shExpMatch(url, "*://*:*@*")  ) 		//  Passwort
    {	
	return "DIRECT";
    };
    
    if ( shExpMatch(url, "http:*") ||
	 shExpMatch(url, "ftp:*") ||
	 shExpMatch(url, "gopher:*") ) {
	if ( dnsDomainIs(host, "Uni-Bonn.DE") )
	{
	    return "DIRECT";
	} else {
            if ( isInNet( myIpAddress(), "134.95.0.0", "255.255.0.0") ||
                 isInNet( myIpAddress(), "192.76.170.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "192.76.171.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "193.17.190.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "193.17.191.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "194.94.16.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "194.94.17.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "194.95.76.0", "255.255.255.0")||
                 isInNet( myIpAddress(), "194.95.77.0", "255.255.255.0")
               ) {
	         return "PROXY wwwcache.uni-koeln.de:8080; PROXY www-cache.informatik.uni-bonn.de:3128; DIRECT";
            } else {
                if ( isInNet( myIpAddress(), "139.6.0.0", "255.255.0.0") ) {
                   return "PROXY wwwproxy.fh-koeln.de:80; PROXY wwwcache.uni-koeln.de:8080; PROXY www-cache.informatik.uni-bonn.de:3128; DIRECT";
                } else {
                    if (isInNet( myIpAddress(), "131.220.0.0", "255.255.0.0") ||
                        isInNet( myIpAddress(), "128.7.0.0", "255.255.0.0") ||
                        isInNet( myIpAddress(), "134.104.0.0", "255.255.0.0") ||
                        isInNet( myIpAddress(), "193.175.27.0", "255.255.255.0") ||
                        isInNet( myIpAddress(), "193.174.6.0", "255.255.255.0")
                       ) {
                         return "PROXY www-cache.informatik.uni-bonn.de:3128; PROXY wwwcache.uni-koeln.de:8080; DIRECT";
                    };
                };
            };
	};
    };
    
    return "DIRECT";
    
};

