My .pac looks something like this:
function FindProxyForURL(url, host)
{
// variable strings to return
var proxy_yes = "PROXY yourproxyhere.com:7128";
var proxy_no = "DIRECT";
if (shExpMatch(url, "https://proxythissite.com*")) { return proxy_yes; }
if (shExpMatch(url, "https://proxythissitealso.com*")) { return proxy_yes; }
// Proxy anything else
return proxy_no;
}
You'll need to put your proxy details in (including the port number if applicable), and specify which sites you want proxied. Edit this text in TextEdit, and save it as proxy.pac. Then, go into System Preferences->Network->Advanced->Proxies and select "Automatic Proxy Configuration". Select your .pac file and hit "OK". Then, hit "Apply" and you're all set.
Unfortunately, my .pac file doesn't seem to be working under 10.7 (Lion). I guess I'll have to wait for Apple to debug their shiny new OS a little further!