I have a SOCKS proxy listening on 7070 at localhost.

Here is what my proxy.pac file looks like (to keep the test simple, I just return SOCKS proxy for all urls):

function FindProxyForURL(url, host)
   return "SOCKS";

This doesn't work in Safari or Chrome. However, for other native apps like Twitter for Mac and Dropbox, this works fine.

I'm getting around it by using Firefox with the Autoproxy plugin, but I would like to use Safari. Why isn't it working?

  • 1
    hmmm... it looks like the reason is that i am using a local file. if i put it in my web server, and then put a HTTP url in the proxy setting, then it works!
    – cutemic
    Jul 23, 2011 at 6:36
  • I use a local SOCKS proxy too, and I just have it set in the "SOCKS Proxy" entry in the Proxies configuration rather than using any .pac file. Any reason not to do that?
    – Kevin Reid
    Jul 24, 2011 at 3:48
  • @KevinReid Hi Kevin, the socks proxy I am using is actually a SSH tunnel. my SSH account is a volume based subscription so i want to route only traffic that needs proxy to use SOCKS.
    – cutemic
    Nov 12, 2011 at 4:29

2 Answers 2


Enable web sharing and place the PAC file (e.g. proxy.pac) in the documents folder (/Library/WebServer/Documents). Then set the auto proxy setting to If the changes don't take effect immediately or you change the contents of the PAC file at any point in time you need to restart Safari and clear its cache. If this doesn't help, reboot the system.


Setting the file again under Automatic Proxy Configuration after entering any junk URL seems to re-read the file for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .