Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

OS version: OS X 10.8.2
PAC file path: http://localhost/proxy.pac
Target applications: Safari, Tweetbot
Example rule in .pac:

if (shExpMatch(url, '*domain.com*')) return 'SOCKS5 127.0.0.1:8080';

In Chrome, the SOCKS5 proxy works perfectly, but Safari/Tweetbot just can't access the matched URL.

It looks like the server of matched URL is down for Safari/Tweetbot.

I took a look at logs in Console.app, but everything is fine.

I wonder if there's a way to make .pac works for sandboxed application?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

OK, I figured out how to fix this problem, write rule like this:

if (shExpMatch(url, '*domain.com*')) return 'SOCKS5 127.0.0.1:8080;SOCKS 127.0.0.1:8080';

Or setup a HTTP proxy with Privoxy, then write rule like this:

if (shExpMatch(url, '*domain.com*')) return 'PROXY 127.0.0.1:8118';

8118 is the default port for Privoxy.

I prefer the second way, it seems more stable though I haven't prove it yet.

share|improve this answer

Because of unknown reasons, from now on you should setup the proxy server in System Network Settings first and than you can use your PAC file as usual.

In other words, check both Autoproxy and Socksproxy in System Network Settings.

share|improve this answer

Your Answer

 
discard

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.