function FindProxyForURL(url, host)
{
//If they have only specified a hostname, go directly.
if (isPlainHostName(host))
return "DIRECT";
if (dnsDomainIs(host, "127.0.0.1"))
return "DIRECT";
if (dnsDomainIs(host, "localhost"))
return "DIRECT";
//These connect directly if the machine they are trying to
//connect to starts with "intranet" - ie
http://intranet
//Connect directly if it is intranet.*
//If you have another machine that you want them to
//access directly, replace "internal*" with that
//machine's name
if (shExpMatch( host, "intranet*")||
shExpMatch(host, "internal*")||
shExpMatch(host, "uovsvm1*")||
shExpMatch(host, "inch*")||
shExpMatch(host, "196.21.180.*")||
shExpMatch(host, "196.21.181.*")||
shExpMatch(host, "196.21.182.*")||
shExpMatch(host, "127.0.0.*")||
shExpMatch(host, "192.168.255.*")||
//Vir Chemie
shExpMatch(host, "149.236.99.*")||
shExpMatch(host, "146.182.*.*"))
return "DIRECT";
//Connect directly to our domains (NB for Important News)
if (dnsDomainIs( host,"uovs.ac.za")||
dnsDomainIs( host,"ufs.ac.za")||
dnsDomainIs( host,"imagenow.ufs.ac.za")||
dnsDomainIs( host,"uv.ac.za")||
dnsDomainIs( host,"uovs.co.za")||
dnsDomainIs( host,"www.kovsiefm.co.za")||
dnsDomainIs( host,"ufslearn.co.za")||
dnsDomainIs( host,"saahefs.co.za")||
dnsDomainIs( host,"rims.ac.za"))
//if (dnsDomainIs( host,"uovs.ac.za")||
//If you have another domain that you wish to connect to
//directly, put it in here
// dnsDomainIs(host,"ander.uovs.ac.za"))
return "DIRECT";
//So the error message "no such host" will appear through the
//normal Netscape box - less support queries
if (!isResolvable(host))
return "PROXY cache.ufs.ac.za:3128";
//We only cache http, ftp and gopher
if (url.substring(0, 5) == "http:" ||
url.substring(0, 4) == "ftp:"||
url.substring(0, 6) == "https:"||
url.substring(0, 7) == "gopher:")
// return "PROXY cache.uovs.ac.za:3128; DIRECT";
return "PROXY cache.ufs.ac.za:3128";
// Else
// isInNet(host,"196.21.181.0","255.255.255.0")) return "PROXY linux.uovs.ac.za:8080";
//We don't cache WAIS
if (url.substring(0, 5) == "wais:")
return "DIRECT";
else
return "PROXY cache.ufs.ac.za:3128";