Quantcast
Channel: Sophos User Bulletin Board
Viewing all articles
Browse latest Browse all 14361

Discussion about PAC files

$
0
0
Hi All

There are quite a few users using *.pac files and I think it's important to make sure the are as much optimised as possible

I have attached the *.pac file I am using below. Open to feedback :)

The pac file is using proxy for all connections apart from the ones below:
192.168.2.*','*.intranet','127.0.0.1','*****.home. dyndns.org','database.clamav.net','*.videolan.org' ,'*.xobni.com','*.ironkey.com'
Also if hostname is a local host the connection is direct.

Code:

//2010-10-30 version 2.1
function FindProxyForURL(url, host)
{
var i=myIpAddress();
if(isPlainHostName(host))
{
return "DIRECT";
}
var g=new Array('192.168.2.*','*.intranet','127.0.0.1','stuffman.home.dyndns.org','database.clamav.net','*.videolan.org','*.xobni.com','*.ironkey.com');
for(var i=0;i<g.length;i++)
{
if(shExpMatch(host,g[i]))
{
return "DIRECT";
}
return "PROXY 192.168.2.100:8080; DIRECT";
}
}


Viewing all articles
Browse latest Browse all 14361

Trending Articles