Freelance Web Developer

Hire Me @ $20/hr

Mar 30, 2017

Using TOR is easy

Note: This tutorial is for macOS only.

Step 1. Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL"

Step 2. Install TOR
brew install tor

Step 3. Use this shell script. Save this to source

#!/usr/bin/env bash

# 'Wi-Fi' or 'Ethernet' or 'Display Ethernet'

# Ask for the administrator password upfront
sudo -v

# Keep-alive: update existing `sudo` time stamp until finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

# trap ctrl-c and call disable_proxy()
function disable_proxy() {
    sudo networksetup -setsocksfirewallproxystate $INTERFACE off
    echo "$(tput setaf 64)" #green
    echo "SOCKS proxy disabled."
    echo "$(tput sgr0)" # color reset
trap disable_proxy INT

# Let's roll
sudo networksetup -setsocksfirewallproxy $INTERFACE 9050 off
sudo networksetup -setsocksfirewallproxystate $INTERFACE on

echo "$(tput setaf 64)" # green
echo "SOCKS proxy enabled."
echo "$(tput setaf 136)" # orange
echo "Starting Tor..."
echo "$(tput sgr0)" # color reset


Step 4. Make it "executable"
chmod +x

Step 5. Run it

Step 6. Test it

Step 7. Tell me ( Optional )
 I am on twitter @motyar 

Labels: , ,

By :