View Single Post
Old 02-24-07, 12:47 AM   #11 (permalink)
LuMe96
Aximsite Prospect
 
Join Date: Oct 2006
Posts: 5
Thanked 0 Times in 0 Posts
Hi Sulsa,

the idea is to set up a proxy configuration file/script which is located on the business network. Having set the browser to autodetect proxy settings, he is looking for that script. At work, he'll find the script so set up the proxy, at home he won't find the script, so no proxy.

For the script there are two methods : a proxy.pac file or a wpad.dat file (the files are both the same, only the name changes and the way you apply them).

On our network, I've opted for the wpad.dat setup, a bit more complicated but once working, very stable. For the setup, I suggest some googleing on wpad.dat.

The file itself would look something like this (plain text file) :
Suppose your LAN is : 192.168.0.0/255.255.255.0
Suppose your Proxy IP is 192.168.0.200, Port 8080
Suppose your Exchange IP is : 50.50.50.50

Code:
function FindProxyForURL(url, host)
{
   // variable strings to return
   var proxy_yes = "PROXY 192.168.0.200:8080";
   var proxy_no = "DIRECT";
   
   // No proxy on LAN
   if (shExpMatch(url, "http://192.168.0.*")) { return proxy_no; }

   // No proxy on localhost
   if (shExpMatch(url, "http://localhost*")) { return proxy_no; }
   if (shExpMatch(url, "https://localhost*")) { return proxy_no; }
   
   //Use proxy for exchange
   if (shExpMatch(host, "*50.50.50.50*")) { return proxy_yes; }

// default reply : if nothing above matches we use proxy
return proxy_yes;

}
I hope you get the idea.

If you need further help for the setup, feel free to ask.

Bye.
Lutz
LuMe96 is offline   Reply With Quote