I believe many workplaces encounter this proxy issue with the web browser: Local Area Network (LAN) settings for proxy server was configured and published to all users using Active Directory (AD) Group Policy Object (GPO). As a result, all web browsers were configured to direct URL requests to the company’s proxy server by default, even when these devices were using external network to access the web. Therefore, whenever you leave the workplace network, you will have to toggle the proxy server setting manually.
Most people got used to the inconvenience. Some may even write scripts to automate the toggling of proxy server setting. If you are facing the same problem at your workplace, this might be an interesting solution to consider:
How it works?
This PAC file can be coded to help your browsers determine whether the user is currently joined to your workplace, where is the proxy server, whether to direct certain URL requests to your proxy server, and whether certain URL should bypass the proxy server. Therefore with this implementation, yous will be able to switch between your workplace network and any external network seamlessly as the browsers will have the smart capability to decide whether a proxy server should be used or not.
- Locating the PAC file
As mentioned, how to locate the PAC file depends on your preference. I have used AD GPO to publish the instruction to everyone as this is the most simple and convenient method. Using WPAD would require you to configure your DHCP servers and your DNS servers. If you are using Cisco products for your network, you can even look into Web Cache Communication Protocol (WCCP) to do away with PAC file entirely and still meet the same objective.
- Hosting of PAC file
A PAC file can be served using a HTTP server, or hosted using file share where the browsers can map to it. I have opted to use HTTP server as hosting it on file share will create compatibility issues with certain versions of Internet Explorer. When serving the file in a HTTP server, take note of using the recommended Multi-Purpose Internet Mail Extensions (MIME) types for the PAC file as this can potentially cause errors.
- Testing the implementation
You can configure your browser to locate the PAC file in your local file directory as you debug it, before implementing it on all your users.
Find out more from the following resources.
- FindProxyForURL – go-to resource for practical assistance with PAC file
- websense – PAC file best practices