I'm failing to make every command in terminal (and ideally every MacOS app) to connect via TOR network by default in MacOS.
A simple test works when I expicitly request to use TOR proxy:
curl --socks5 localhost:9050 --socks5-hostname localhost:9050 -s https://check.torproject.org/ | cat | grep -m 1 Congratulations | xargs Congratulations. This browser is configured to use Tor.
...but fails if I don't specify any proxy at all:
$ curl -s https://check.torproject.org/ | cat | grep -m 1 Sorry | xargs Sorry. You are not using Tor.
I'm using VPN set in MacOS System Preferences; I'm on High Sierra 10.13.6.
This is what I've tried to make it work:
- manually adding
Advanced > Socks > Proxies > SOCKS > localhost:9050to VPN and/or current Internet service (Wi-Fi) for current Network Location
- manually creating a full clone of current Network Location and setting it up the same way
. torsocks onin the Terminal window where I later run
torper se in a separate Terminal window; running
brew services start tor
Using a script suggested at kremalicious results in:
$ INTERFACE=Automatic $ sudo networksetup -setsocksfirewallproxy $INTERFACE 127.0.0.1 9050 off Password: ** Error: The parameters were not valid. $ sudo networksetup -setsocksfirewallproxystate $INTERFACE on ** Error: Unable to find item in network database.
torify results in error:
(torify curl -s https://check.torproject.org) | grep Congratulations ERROR: /usr/bin/curl is located in a directory protected by Apple's System Integrity Protection.