DEV Community

Cover image for How to overcome censorship by using tor system-wide on macOS
Saifur Rahman Mohsin
Saifur Rahman Mohsin

Posted on

1 1

How to overcome censorship by using tor system-wide on macOS

Today, I will demonstrate how one can use the tor program as a system-wide proxy on macOS and thereby avoid censorship and gain anonymity.

Step 1: Install tor
You can do this from your Terminal, simply by running

brew install tor
Enter fullscreen mode Exit fullscreen mode

Step 2: Add the custom script to your .bash_profile
You can find the script at my github repo. Copy the 2 functions, and paste it into .bash_profile at the very end.

Step 3: Reset your terminal
For the functions to reload, you have to close and open the terminal app. Once done, you can run starttor and walla, it will start the tor network and show this:
Screenshot 2020-11-07 at 2.43.49 PM

And that's pretty much it. Surf the web anonymously now, and when you're done, go back to the terminal and hit Ctrl+C and it will cancel the tor relay.

Caveat: In case, the tor relay fails to cancel for some reason, the proxy will still be using the tor port and therefore the entire web will be unavailable. Simply run stoptor if this happens and it will clear up the proxy back to it's default setting i.e. no proxy.

For those who prefer a video version of the same, check this out:

Youtube Demo

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay