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.app/Contents/MacOS/Google\ Chrome

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

About Greg Ferro

Human Infrastructure for Data Networks. 25 year survivor of Corporate IT in many verticals, tens of employers working on a wide range of networking solutions and products.

Host of the Packet Pushers Podcast on data networking at http://packetpushers.net- now the largest networking podcast on the Internet.

Comments

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.

Network Break Podcast

Network Break is round table podcast on news, views and industry events. Join Ethan, Drew and myself as we talk about what happened this week in networking. In the time it takes to have a coffee.

Packet Pushers Weekly

A podcast on Data Networking where we talk nerdy about technology, recent events, conduct interviews and more. We look at technology, the industry and our daily work lives every week.