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.

About Greg Ferro

Greg Ferro is a Network Engineer/Architect, mostly focussed on Data Centre, Security Infrastructure, and recently Virtualization. He has over 20 years in IT, in wide range of employers working as a freelance consultant including Finance, Service Providers and Online Companies. He is CCIE#6920 and has a few ideas about the world, but not enough to really count.

He is a host on the Packet Pushers Podcast, blogger at and on Twitter @etherealmind and Google Plus

You can contact Greg via the site contact page.

  • 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.

Subscribe For Weekly Updates by Email

Get a Weekly Summary of Latest Articles and Posts to your Email Inbox Every Sunday

Thanks for signing up. Look for the email from MailChimp & make sure you confirm your email address. You may need to check your spam or gmail settings to be sure of receiving the email.

Note: You can unsubscribe at any time using the link at the bottom of every email.