Tech Note: Command Line for Alternate PAC file for Chrome

Sometimes you need to use many different Proxy Auto Configuration files with a web browser, usually when testing or trying out new installation of the proxy servers. Most browsers have command line options that let you specify different PAC files to use which can then be configured so that you have multiple startup options.

/path/to/Chrome --proxy-pac-url=file:///path/to/config.pac

The actual command line for starting Chrome on Mac OSX is

/Applications/Google\\ Chrome

add your own extensions for the PAC file as you need to.

  • Ian Triggs

    I also have to do a heap of PAC testing.

    There’s also a really excellent extension for Chrome which can manage all of this for you and allow you to switch between all sorts of different PAC and proxy setups without having to close down Chrome. The changes are instant and it never fails.

    Check out ‘Proxy SwitchySharp’ in the Chrome Extensions section of the Chrome Webstore (it’s free).

    As well as this, if you’re the one who has to edit the PAC file, I recommend ‘pactester’, you can find it on Google Code. It will allow you to test the PAC on the command line before rolling it out. Handy so you don’t end up deploying something with syntax errors which bring the internet to a halt for the whole company. It also allows you to see the result when you pass it a URL, it’ll tell you if it gets proxied, by which proxy or if it goes direct.