Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 '11 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 '11 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 '11 at 4:29
up vote 0 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.