Diving into the Dark: A Beginner’s Guide to the Tor Network

The Tor Network (The Onion Router) is a decentralized, anonymous communication layer built to protect privacy and bypass censorship. Unlike the regular web (clearnet), Tor sites (”.onion” domains) are not accessible via standard browsers like Chrome or Firefox — unless you configure them manually or use the Tor Browser. Tor is open-source, and anyone can contribute by running relays, bridges, or even hosting their own .onion hidden services

2025-06-13 02:29:49 - Venom

Understanding Tor’s Architecture

The magic of Tor lies in how it routes traffic through multiple relays (called nodes), encrypting it layer by layer — like an onion. This process hides your IP address, location, and traffic data.

Here’s what makes Tor special:

The torrc File: Tor’s Brain

When you install Tor on Linux:

sudo apt-get install tor

It creates a configuration file at:

/etc/tor/torrc

This file governs how your Tor instance behaves — from proxy ports to relay setup to hidden services.

Sample torrc Highlights
SocksPort 9050          # Local SOCKS5 proxy (used by browsers/tools)
SocksPort 0.0.0.0:9100  # Exposes SOCKS5 proxy on all interfaces
SocksPolicy accept *               # Accept all connections
RunAsDaemon 1                      # Run Tor in background
Hidden Services
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80  
Relay Example (Acting as a node)
ORPort 9001
Nickname SirVenomRelay
RelayBandwidthRate 100 KB
ContactInfo sirvenom@hackerscult.com
ExitPolicy reject *:*  # Acts as a middle relay, not an exit
 Connecting to Onion Sites in Python

Once SocksPort 9050 is active and Tor is running, Python can access .onion domains using requests + SOCKS5:

import requests


session = requests.Session()
session.proxies = {
    "http": "socks5h://localhost:9050",
    "https": "socks5h://localhost:9050"
}
response = session.get("http://exampleonion.onion")
print(response.status_code)

 This method is perfect for:

Surfing Onion Sites with Firefox

You can also configure Firefox manually:

Steps:

  1. Go to Settings → Network Settings
  2. Select Manual Proxy Configuration
  3. Set SOCKS Host: 127.0.0.1
  4. Set Port: 9050
  5. Enable “Proxy DNS when using SOCKS v5”

That’s it — you’re ready to visit .onion sites like:

What’s Next?

This was a beginner-friendly walkthrough into the world of Tor. In future parts, I’ll cover:

You can also check my project onion.lat

More Posts