In At The Bleep End
Thursday, April 14, 2005
PAC files and Firefox Firefox is a terrific browser, much better than Internet Exploder in many ways, but there's one area that IE still edges it - proxy handling. Example: We have a couple of laptops which have recently had Firefox installed as their primary browser. At work they are plugged into the LAN, and at home they use dial-up accounts. We use Mimesweeper as a proxy on our LAN, to protect against various threats. In Explorer you can set a proxy to use when connected to the LAN. This proxy setting is ignored if dial-up is used. Firefox doesn't care how you connected - LAN or dial-up, any proxy you set is applied to both. This give you 4 options... 1. the proxy has to be permanently off (not desirable) 2. the user has to be shown how to turn it on and off, and trusted to do this every day (!) 3. the user can't use Firefox at home (because it will fail when looking for the proxy) or 4. Use a PAC file PAC or Proxy Auto Configuration files are often used to block users from viewing specific sites, or sites with dodgy phrases in their URLs. You can also use PAC files to check for a LAN and to aim at a proxy if one is found. Here's a basic PAC file to do it, taken from this site... function FindProxyForURL(url, host) { if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0")) return "PROXY 192.168.1.1:80"; else return "DIRECT"; } Red text - Adjust to suit your network Green text - Change to your proxy address:port Save your PAC file, open Firefox, Go Tools > Options > General > Connection Settings. Then put the location of your file in the 'Automatic Proxy Configuration URL' box. |