Proxy
Proxy
11 from 2_979
function FindProxyForURL(url, host)
{
/* Convert the host parameter to lowercase
to facilitate case insensitive matching.
*/
host = host.toLowerCase();
/* Query page should always resolve to the proxy - even if it's treated as a
local address */
if (isResolvable(host) & !(shExpMatch(url,
'http://query.webdefence.global.blackspider.com/*')))
{
var hostIP = dnsResolve(host);
if (url.substring(0, 6) == 'https:')
{
var pats = new Array("");
for (i in pats)
{
if (shExpMatch(host, pats[i].toLowerCase()))
{
// non-SSL-terminate hosts must use the normal address/port
return 'PROXY webdefence.global.blackspider.com:8081';
}
}
}
if (url.substring(0, 5) == 'http:' || url.substring(0, 6) == 'https:')
{
return 'PROXY webdefence.global.blackspider.com:8081';
}
if (url.substring(0, 4) == 'ftp:')
{
// ftp must use the normal address/port
return 'PROXY webdefence.global.blackspider.com:8081';
}
return 'DIRECT';
}