Set SOCKS5 to 127.0.0.1 and port 9050 when you want an app to send traffic through the local Tor proxy. That address means “this computer,” and port 9050 is the usual Tor SOCKS port on many setups [source: Tor Project]. If Tor is not running, nothing magical happens. The app just sulks and fails to connect.

TLDR

Use SOCKS5 host: 127.0.0.1 and port: 9050. For example, in Firefox, set a manual SOCKS proxy to 127.0.0.1, port 9050, then pick SOCKS v5. A small team testing 40 region blocked pages can route one browser through Tor while keeping the rest of the computer normal. Expect the first connection to take a few seconds longer, because Tor builds a circuit before loading the page.

What You Are Actually Setting Up

SOCKS5 is a proxy type. It sits between your app and the internet. Your app hands traffic to the proxy. The proxy sends it onward.

127.0.0.1 is the loopback address. That is nerd speak for your own machine. So when you enter 127.0.0.1:9050, you are telling the app:

  • Talk to a proxy on this same computer.
  • Use port 9050.
  • Use SOCKS5, not HTTP proxy mode.

Most often, this points to Tor running locally. Tor listens on that port and moves traffic through its network. If Tor is closed, paused, blocked, or misconfigured, the proxy will not work. Simple. Annoying. Classic software behavior.

Step 1: Make Sure Tor Is Running

Before touching browser settings, start Tor. This may be the Tor service, the Tor Browser, or a Tor package installed with your system tools.

On Linux, you may use:

sudo systemctl start tor

To check if it is active:

sudo systemctl status tor

On macOS, if installed with Homebrew, you may use:

brew services start tor

On Windows, Tor Browser is often the easiest route. Start it first. Some setups use port 9150 instead of 9050. It drives me crazy that this tiny port difference wastes 10 minutes for so many people. If 9050 fails, try 9150.

Step 2: Test the Port

You can check if something is listening on port 9050.

On Linux or macOS:

nc -vz 127.0.0.1 9050

Or:

ss -ltn | grep 9050

On Windows PowerShell:

Test-NetConnection 127.0.0.1 -Port 9050

If the test fails, do not blame the browser yet. Start Tor. Check the port. Check your firewall. Then try again.

Configure Firefox

Firefox is one of the friendliest apps for this job. It gives you clear proxy boxes. Bless it.

  1. Open Settings.
  2. Search for Network Settings.
  3. Click Settings.
  4. Choose Manual proxy configuration.
  5. Find SOCKS Host.
  6. Enter 127.0.0.1.
  7. Enter port 9050.
  8. Select SOCKS v5.
  9. Enable Proxy DNS when using SOCKS v5, if shown.
  10. Click OK.

The DNS option matters. Without it, your browser may still ask your normal DNS server about sites. That is the kind of tiny checkbox that causes big facepalms.

Configure Chrome or Chromium

Chrome usually uses your system proxy settings. That can be clunky. A cleaner test is to launch Chrome with a proxy command.

On Linux:

google-chrome --proxy-server="socks5://127.0.0.1:9050"

On macOS:

open -a "Google Chrome" --args --proxy-server="socks5://127.0.0.1:9050"

On Windows, create a shortcut. Add this to the target after the Chrome path:

--proxy-server="socks5://127.0.0.1:9050"

Close all Chrome windows first. Chrome likes to keep background processes alive. Honestly, it feels like Chrome takes “closed” as a suggestion, not a command.

Use It With curl

curl is great for quick testing. Use this:

curl --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/

Use --socks5-hostname, not only --socks5, when you want hostname lookup through the proxy. This helps reduce DNS leaks.

You can also set an environment variable:

export ALL_PROXY=socks5h://127.0.0.1:9050

The h in socks5h tells many tools to resolve hostnames through the proxy. Tiny letter. Big difference.

Use It With Git

Need Git through SOCKS5? Set it like this:

git config --global http.proxy socks5h://127.0.0.1:9050
git config --global https.proxy socks5h://127.0.0.1:9050

To remove it later:

git config --global --unset http.proxy
git config --global --unset https.proxy

Do not leave proxy settings on forever unless you mean to. Future you will thank present you.

How to Confirm It Works

Open a test page such as the Tor check page. If your app is using Tor, it should say so. If not, check these things:

  • Is Tor running?
  • Is the port really 9050?
  • Is the app set to SOCKS5, not HTTP?
  • Did you enable proxy DNS?
  • Is a VPN, firewall, or antivirus blocking local proxy traffic?

Also try port 9150. Tor Browser often uses it. The standalone Tor service often uses 9050. This is not always true, but it is a very useful guess.

Common Mistakes

  • Using HTTP proxy mode. SOCKS5 is not the same thing.
  • Typing localhost wrong. Use 127.0.0.1 to keep it clear.
  • Forgetting Tor. The proxy address is useless if no proxy is running.
  • Ignoring DNS. Use SOCKS5 hostname support where possible.
  • Setting the whole system by accident. One app may be safer for testing.

Safety Notes Without the Lecture

A SOCKS5 proxy at 127.0.0.1:9050 can hide your app traffic from some observers. It does not make you invisible. Login cookies still identify you. Browser fingerprints still exist. Downloads can still reveal data if opened carelessly.

Use Tor Browser if privacy is the main goal. It is tuned for that job. Manual SOCKS settings are useful for testing, scripts, package tools, and special apps.

Quick Cheat Sheet

  • Host: 127.0.0.1
  • Port: 9050
  • Type: SOCKS5
  • DNS: proxy it when possible
  • Fallback port: 9150
  • Best test: use Firefox or curl

That is the whole trick. Start Tor. Point your app at 127.0.0.1:9050. Pick SOCKS5. Test it. If it fails, check the port before you start yelling at your computer.

Scroll to Top
Scroll to Top