Help,
First off I am using group policies on Windows Server 2003 to determine which users use the pac file. Most people have unlimited access to the internet. I am using a pac file to limit web access for a specific group of users. They are only allowed to use the internet when they either access our intranet or a specific list of websites. This is how I wrote my pac file:
var myWebs = new Array();
myWebs[0] = "http://intranet*"; // our intranet
myWebs[5] = "http://192.168.0.*"; // allow access to any network appliance
myWebs[1] = "http://www.companywebsite.org*";
myWebs[2] = "https://mail.companywebsite.org*";
myWebs[3] = "*netsmart*";
myWebs[4] = "https://name.attendance.com*";
myWebs[6] = "*.gov*";
myWebs[7] = "*state.*.us*";
myWebs[9] = "http://dictionary.reference.com*";
myWebs[10] = "http://thesaurus.com*";
// ETC..
function FindProxyForURL( url, host ) {
for( var i = 0; i < myWebs.length; i++ )
if ( shExpMatch( url, myWebs[i] ) ) { return "DIRECT"; }
return "PROXY 199.199.199.0:8080"; // a fake proxy server address
}
If the user goes to an allowed address in the list, it connects without a proxy server. If the user goes to any other sites, it searches for the fake proxy and fails to load. This is exactly how I want it to work and it does work with only one problem that I cannot figure out. I hope someone here could help me with this.
For example, if a user visits http://www.state.oh.us (on the list), and that site has a linked image to http://www.yahoo.com (not on the list), the image will not load. In some cases a site may have a link to an external stylesheet or javascript, which then throws back errors and clunky results. In some cases the website won't load at all even though it's on the list (actually only one of them does this, not so important).
Is there any other way I can accomplish this feat without purchasing a real proxy server?
Thanks in advance,
Dave