Just a few weeks ago on OS X Yosemite, it worked fine. Now, after performing a clean install of OS X El Capitan it no longer works. I’m very inclined to believe something in El Capitan is the culprit since it doesn’t work on two different computers but I can get it to work right now by doing it in a Yosemite VM guest inside an El Capitan host.

Using Homebrew, I install tor and torsocks:

brew install tor torsocks

Installation goes fine. I then copy over the sample torrc and add ExitNodes

cp "$(brew --prefix)/etc/tor/torrc.sample" "$(brew --prefix)/etc/tor/torrc"
echo 'ExitNodes {es}' >> "$(brew --prefix)/etc/tor/torrc"

I start tor

tor &

Everything goes OK

Oct 16 01:18:50.101 [notice] Tor v0.2.6.10 (git-58c51dc6087b0936) running on Darwin with Libevent 2.0.22-stable, OpenSSL 1.0.2d and Zlib 1.2.5.
Oct 16 01:18:50.101 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Oct 16 01:18:50.102 [notice] Read configuration file "/usr/local/etc/tor/torrc".
Oct 16 01:18:50.104 [notice] Opening Socks listener on
Oct 16 01:18:50.000 [notice] Parsing GEOIP IPv4 file /usr/local/Cellar/tor/
Oct 16 01:18:50.000 [notice] Parsing GEOIP IPv6 file /usr/local/Cellar/tor/
Oct 16 01:18:50.000 [notice] Bootstrapped 0%: Starting
Oct 16 01:18:50.000 [notice] Bootstrapped 5%: Connecting to directory server
Oct 16 01:18:50.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Oct 16 01:18:50.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Oct 16 01:18:51.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Oct 16 01:18:52.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Oct 16 01:18:52.000 [notice] Bootstrapped 100%: Done

Then I try to use torsocks to check if everything is fine

torsocks curl -s https://check.torproject.org | grep Congratulations

No message, which means it isn’t working. I also try to check my IP

torsocks curl http://ipecho.net/plain

It confirms it isn’t working, by showing my real IP.

I also tried various other commands and apps, as well as different ExitNodes (including none at all) and different configurations. Nothing seems to do the trick. It works correctly on Yosemite, and I do nothing differently. Since there isn’t an actual error shown, this is difficult to diagnose.

As a further note (not sure how relevant it is), torsocks show outputs


And here are the Dependencies part of brew info tor

==> Dependencies
Required: libevent ✔, openssl ✔
Optional: libnatpmp ✘, miniupnpc ✘, libscrypt ✘

and brew info torsocks

==> Dependencies
Build: autoconf ✔, automake ✔, libtool ✔

To note that torsocks is the one that doesn’t work. tor by itself does, when configured in System Preferences. This can also be confirmed with curl, by doing curl --socks5 http://ipecho.net/plain.

  • 1
    Does TorSocks need DYLD_INSERT_LIBRARIES – Mark Oct 24 '15 at 22:20
  • 1
    @Mark No idea, hence why I stated I don’t know how relevant it is. The value is the same under Yosemite and El Capitan, though, so likely not the cause. – user137369 Oct 25 '15 at 0:11
  • 1
    I have the same problem, it's still working on my other Macbook with Yosemite, but doesn't work on this one running OSX El Capitan. Tor works, I've confirmed. But Torsocks doesn't. – Sheharyar Oct 26 '15 at 8:26
  • 1
    @Sheharyar Which steps have you taken to confirm tor really is working? – user137369 Oct 26 '15 at 12:53
  • 1
    Start tor. Open any browser, and change proxy to (using plugins or by changing settings in System Preferences). Visit check.torproject.org. If tor's working, it'll tell you. – Sheharyar Oct 26 '15 at 12:56

The problem doesn't appear to be in "tor" or "torsocks". The problem seems to be in the version of "curl" shipped with El Capitan.

Similar to yourself if I try torsocks curl -s https://check.torproject.org | grep Congratulations I get nothing back.

However if I try torsocks wget -qO- https://check.torproject.org | grep Congratulations I get the expected replies.

  Congratulations. This browser is configured to use Tor.
  Congratulations. This browser is configured to use Tor.

But if you install curl from brew (resulting in a newer version of curl than ships with El Capitan) and then run torsocks /usr/local/Cellar/curl/7.45.0/bin/curl -s https://check.torproject.org | grep Congratulations, you get the expected "Congratulations" messages (note the version number might be different by the time you try this).

  Congratulations. This browser is configured to use Tor.
  Congratulations. This browser is configured to use Tor.
  • 2
    Thank you. That would explain why proxychains-ng also does not work. I wonder that the exact issue is with this particular curl version. – user137369 Dec 2 '15 at 20:02
  • 3
    Strictly speaking, this answer isn't quite right. It wasn't the new version of curl in brew that got torsocks working, its that torsocks cant DYLD_INSERT into a system binary on El Capitan due to SIP. System-curl is a system binary. pointing torsocks to a curl it can inject into is what made it work :) – J.J Dec 10 '15 at 0:48
  • since i am using lots of http2 protocols, i had to install and configure curl-openssl via brew, which caused me the troubles inconjunction with torsocks. using curl via brew went smooth – Mr. Jul 1 at 16:29

You must log in to answer this question.

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