DarkDayan

Deep & Dark Web Extension

Tor Hidden Service (.onion) Lab

Step 1: Install Tor

Linux:
  sudo apt update
  sudo apt install tor -y

Windows/macOS:
Download Tor Expert Bundle: https://www.torproject.org/download/
Extract and set PATH
Tor daemon is required to create a hidden service. Without installing Tor, you cannot run .onion services.

Step 2: Configure Hidden Service

# Edit torrc file
HiddenServiceDir /home/user/tor_hidden_service/
HiddenServicePort 80 127.0.0.1:3000
    
HiddenServiceDir stores your .onion hostname & private key. HiddenServicePort maps .onion address to your local server port (3000 here).

Step 3: Start Local Server

const express = require('express');
const app = express();
app.get('/', (req, res) => {
  res.send("Welcome to your Tor Hidden Service (.onion) lab!");
});
app.listen(3000, () => console.log("Server running on http://127.0.0.1:3000"));
    
Local server serves the content that the Tor hidden service will make available through the .onion address.

Step 4: Start Tor

sudo systemctl start tor
Check /home/user/tor_hidden_service/hostname for your .onion address
Access it via Tor Browser
    
Starting Tor activates the hidden service. The hostname file contains the .onion URL to access securely.

Step 5: Firewall Hardening

# iptables example: only allow local access to service port
sudo iptables -A INPUT -p tcp --dport 3000 -s 127.0.0.1 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 3000 -j DROP

ufw alternative (Ubuntu)

sudo ufw allow from 127.0.0.1 to any port 3000 proto tcp
sudo ufw enable
Prevent direct access to your local server from outside. Only Tor daemon (localhost) should reach port 3000. This reduces attack surface.

Step 6: Vanity .onion Address (mkp224o)

# Install dependencies (Debian/Ubuntu)
sudo apt install build-essential libsodium-dev libssl-dev git -y

Build mkp224o

git clone https://github.com/cathugger/mkp224o.git
cd mkp224o
./autogen.sh
./configure
make

Generate address with prefix "darkday"

./mkp224o darkday -d ./keys -n 1 -v

Result stored in keys/ folder; move hostname & keys to HiddenServiceDir

  

Step 7: Onion-Location Header (Redirect automatically)

# Apache config (.htaccess or virtualhost)
Header set Onion-Location "http://youronionaddress.onion%{REQUEST_URI}s"

Nginx config

add_header Onion-Location http://youronionaddress.onion$request_uri;
Tor Browser will show a ".onion available" button, making it easy for users to switch to the more private .onion version of your clearnet site.

Step 8: Run Multiple Hidden Services

HiddenServiceDir /var/lib/tor/hidden_service1/
HiddenServicePort 80 127.0.0.1:3000

HiddenServiceDir /var/lib/tor/hidden_service2/
HiddenServicePort 80 127.0.0.1:3001
You can host several .onion sites on one Tor instance by specifying different directories and ports. Each gets its own hostname and private key.

Step 9: Monitor Tor Metrics with Nyx

sudo apt install nyx
nyx -i 127.0.0.1:9051
# (requires ControlPort 9051 and HashedControlPassword in torrc)
    
Nyx (formerly arm) provides real-time Tor bandwidth, circuits, and hidden service activity. Helps debug performance issues and detect unusual behavior.

Step 10: Performance Tuning for High Traffic

# torrc additional lines
SocksPort 0               # disable SOCKS if not needed
HiddenServiceSingleHopMode 0  # keep to 0 for anonymity
HiddenServiceNonAnonymousMode 0
HiddenServiceMaxStreams 1000
HiddenServiceMaxStreamsCloseCircuit 1
    
Adjustments like increasing max streams and closing circuits aggressively help under load, but always preserve anonymity features.

Resource Links – Tor Hidden Services

Official docs, community tools, and monitoring platforms ensure you stay updated and your hidden service remains reliable and secure.

I2P Hidden Service (.i2p) Lab

Step 1: Install I2P

Download I2P: https://geti2p.net/en/download
Install and start Java Router
    
I2P software is required to join the anonymous I2P network and host .i2p hidden services.

Step 2: Start Local Server

const express = require('express');
const app = express();
app.get('/', (req, res) => {
  res.send("Welcome to your I2P Hidden Service (.i2p) lab!");
});
app.listen(3001, () => console.log("Server running on http://127.0.0.1:3001"));
    
Local server hosts the content for the I2P hidden service, similar to Tor.

Step 3: Configure I2P Hidden Service

Open I2P console: http://127.0.0.1:7657/
Hidden Services → Add new service
Local Port: 3001
Service Name: MyI2PLab
I2P will give you a .i2p address
    
This maps your local server to a .i2p address on the anonymous I2P network.

Step 4: Access Service

Use I2P Browser or Java Router to visit your .i2p address
Optional: Restrict access to LAN/Home network
    
Accessing through I2P browser ensures anonymous network communication.

Step 5: Use i2pd (C++ Router) – Lightweight Alternative

# Debian/Ubuntu
sudo apt install i2pd

Configure /etc/i2pd/i2pd.conf (basic)

Enable HTTP/HTTPS tunnels in /etc/i2pd/tunnels.conf

[i2p-website]
type = http
host = 127.0.0.1
port = 3001
keys = website-keys.dat

Start i2pd

sudo systemctl start i2pd

.i2p address will be printed in logs or derived from keys

  

Step 6: Set Up a Full Eepsite (Jetty)

# I2P includes a built-in Jetty server for eepsites.
# In I2P console: Hidden Services → New Eepsite
# Choose a name and the wizard creates the directory.
# Place your HTML/CSS files in ~/.i2p/eepsite/docroot/
    
Using the integrated eepsite wizard is the simplest way to host static sites on I2P without an external web server.

Step 7: Addressbook Subscriptions (Discovery)

I2P Console → Addressbook
Add subscription:
  http://www.i2p2.i2p/hosts.txt  (official)
  http://stats.i2p/cgi-bin/newhosts.txt
  (or other community jump services)
    
Addressbook subscriptions help users find your .i2p site. Without them, your site is only reachable if someone knows the exact Base64 address.

Step 8: Monitor I2P Performance

I2P Console: http://127.0.0.1:7657/
  Graphs: bandwidth, tunnel status, peer count.
  Logs: /var/log/i2p/ or ~/.i2p/logs/
    
Monitoring helps you tune tunnel length, detect low participation, and ensure your hidden service stays reachable.

Step 9: Troubleshooting Connectivity

# Check I2P router status
curl http://127.0.0.1:7657/

Test your .i2p site locally

curl --proxy 127.0.0.1:4444 http://youraddress.i2p

Ensure firewall allows outbound I2P ports (randomized)

Common issue: clock sync (use NTP)

  

Resource Links – I2P

Official guides and community channels are essential for staying current with I2P development and best practices.

Online Hosting & Service Providers

Njalla – Privacy-Focused Hosting

Njalla offers private domain registration and VPS hosting. It supports Tor and `.onion` hidden services.
Visit Njalla Hosting

Njalla registers domains in their own name for your privacy, while you retain control. VPS plans start from ~€15/month (check site for current pricing). Good option if you want privacy-oriented managed hosting.

OnionHost – Dark Web Hosting

OnionHost specializes in `.onion` hosting and anonymous VPS.
OnionHost Info & Review

Easy `.onion` deployment, but check recent reviews and uptime before relying on it for critical services.

Self-Managed Tor Service (Recommended for full control)

Run Tor on a VPS you control (DigitalOcean, Hetzner, Vultr, Linode, etc.) and follow Tor Project's setup guide.
Tor Official Setup Guide

Gives you full control and independence from third-party hosting policies. You manage Tor updates, firewall, backups and the hidden-service private key.

VPN / Tunnel Alternatives

If you just need a private encrypted network (not .onion/.i2p), consider:

Faster to deploy for private-access apps and often simpler for small teams. Not replacements for Tor/I2P when anonymity is required.

FlokiNET – Offshore Hosting with Tor Support

FlokiNET provides offshore VPS and dedicated servers in Iceland, Finland, Romania. Supports Tor exit nodes and hidden services.
Visit FlokiNET

Strong privacy laws, accepts crypto, and explicitly allows Tor-related services. Good for high-uptime .onion sites.

OrangeWebsite – Anonymous Web Hosting

Iceland-based hosting with focus on freedom of speech. Accepts Bitcoin and supports Tor.
OrangeWebsite

Icelandic jurisdiction, renewable energy powered, and supports .onion hosting. Another solid option for privacy.

OnionShare – File Sharing via Tor Onion Service

OnionShare lets you securely and anonymously share files, host websites, and chat using Tor onion services without setting up a server.
OnionShare Website

One-click temporary .onion service. Perfect for secure file transfer, no server configuration required.

Additional Resources & Tools

They complement your hidden service lab by adding file sharing, secure drop, or providing hardened environments for testing.

Deep Analysis & System Insights

Tor vs I2P – Protocol Architecture Comparison

Feature Tor I2P
Routing Onion routing (layered encryption) Garlic routing (bundles messages)
Network model Client → relays → exit node Peer-to-peer, every node is a relay
Addressing .onion (56-character Base32) .i2p (516-byte Base64 destination)
Anonymity set Large volunteer relay network (~7000 relays) All participants are routers (tens of thousands)
Latency Medium (3-hop circuit) Higher (variable tunnel lengths)
Censorship resistance Bridges, pluggable transports Not as many bridges; more internal focus
Understanding the fundamental differences helps choose the right tool for your threat model. Tor excels at accessing clearnet anonymously; I2P is built for internal services.

Onion Services v3 – Deep Cryptographic Breakdown

- Address format: <56-char Base32>.onion
- Public key: Ed25519 (32 bytes), embedded in address
- Authentication: Client authorization (optional)
- Introduction points: rotated to prevent DoS
- Rendezvous points: temporary meeting place
- End-to-end encryption: TLS-like layer (ntor) between client and server
    
Knowing the crypto underpinnings helps you appreciate the security guarantees and also informs safe operational practices (e.g., protect the private key).

Garlic Routing vs Onion Routing

Onion routing wraps data in multiple layers of encryption, like an onion. Each relay peels one layer. Garlic routing (I2P) bundles multiple messages (cloves) together, adding delays and mixing to frustrate traffic analysis.

Garlic routing is inherently more resistant to timing correlation but increases latency. Design your service considering these trade-offs.

Threat Model for Hidden Services

Understanding attack vectors guides hardening steps: use v3 onion services, OnionBalance for redundancy, and sanitize web server output.

Performance Benchmarks & Optimization Data

Typical onion service latency: 300–800 ms (first byte)
I2P eepsite latency: 1–3 seconds (due to garlic routing)
Throughput: Tor ~10–30 Mbps per circuit, I2P ~2–10 Mbps

Optimizations:

· Enable HiddenServiceExportCircuitID (advanced)
· Use persistent introduction points (v3)
· Compress content, minimize round trips
· Choose low-latency entry guards (ping test)
    
Real-world data sets realistic expectations. Tuning based on these numbers can improve user experience significantly.

Security Hardening Checklist

  1. Disable server signature: server_tokens off; (nginx)
  2. Remove X-Powered-By headers
  3. Set CSP headers to prevent XSS
  4. Use application-layer auth (e.g., Onion Service client authorization)
  5. Run server in isolated VM/container (Docker, LXC)
  6. Regularly update Tor/I2P software
  7. Monitor logs for anomalies
Even if the network is anonymous, a misconfigured web server can leak the real IP or compromise the host. These steps plug common leaks.

Academic Papers & Further Reading

Foundational texts provide deep insight and are essential for anyone seriously operating hidden services.

Regulatory & Ethical Considerations

Operating a hidden service is legal in most jurisdictions, but the content matters. Always comply with local laws. Use these technologies for privacy protection, whistleblowing, and human rights, not for illicit purposes.

Understanding the legal landscape helps you stay safe and use the technology responsibly.

Anonymity Networks – Wikipedia Catalog & Deep Dive

Based on Wikipedia: Category:Anonymity networks — every major network, protocol, and supporting technology. All data, architecture details, and resources included.

1. Tor (The Onion Router) – Low‑latency, circuit‑based

Type: onion routing, low‑latency
Year: 2002 (alpha), 2004 (stable)
Current version: 0.4.8.x
Relays: ~7000 (guards, middle, exits)
Users: ~2 million daily (directly connecting)
Protocol: TLS‑encrypted links, 3‑hop circuits, perfect forward secrecy
Onion services: v3 (Ed25519), v2 (deprecated)
Censorship circumvention: obfs4, meek, Snowflake
Official site: https://torproject.org
    
Largest deployed anonymity network; supports both client‑side anonymity and hidden services; extensive research and battle‑tested.

2. I2P (Invisible Internet Project) – Garlic routing, fully distributed

Type: garlic routing, low/medium latency
Year: 2003
Routers: ~30 000 active (est.)
Transports: UDP (SSU), TCP, NTCP2
Addressing: 516‑byte Base64 destinations (.i2p), human‑readable names via addressbook
Tunnel length: 2‑4 hops (variable)
Key services: eepsites (HTTP), I2PSnark (BitTorrent), I2P‑Bote (email)
Routers: Java I2P, i2pd (C++), Kovri (C++ abandoned)
Official site: https://geti2p.net
    
Fully peer‑to‑peer, every user relays traffic. Strong internal ecosystem. Better suited for hosting services inside the network than accessing the clearnet.

3. Freenet – Censorship‑resistant distributed data store

Type: P2P, content‑addressable, high‑latency
Year: 2000
Routing: key‑based routing (KBR) with XOR metric
Modes: Opennet (public), Darknet (friend‑to‑friend)
Security: plausible deniability, encrypted data blocks
Protocols: Frost (forums), FMS (Freenet Message System), Sone (social plugin)
File storage: CHK (content hash keys), SSK (signed subspace keys), USK (updatable)
Official site: https://freenetproject.org
    
Built for censorship resistance and file sharing, not real‑time communication. Data persists across node churn; strong anonymity via darknet mode.

4. GNUnet – Framework for secure P2P networking

Type: P2P framework, multiple transports
Year: 2001
Components:
  - CADET: low‑latency end‑to‑end encrypted messaging (onion routing like)
  - GNS (GNU Name System): decentralized, censorship‑resistant name system
  - FS (File Sharing): anonymous file transfer
  - TRANSPORT: TCP, UDP, WLAN, Bluetooth, etc.
  - DHT: distributed hash table
  - SET: set reconciliation
Target: fully decentralized alternative to current internet stack
Official site: https://gnunet.org
    
Designed as a complete network alternative; modular, cryptographically strong, and ideal for building secure distributed applications.

5. ZeroNet – Decentralized web using Bitcoin + BitTorrent

Type: P2P web, not fully anonymous by default
Year: 2015
Addressing: Bitcoin‑based addresses (Namecoin .bit domains)
Transport: BitTorrent‑like peer discovery, optional Tor proxy
Content: zites (HTML/CSS/JS) served from peers; SQL database for dynamic sites
Crypto: Ed25519 signing, content integrity via hashes
Anonymity layer: can run behind Tor to hide IP
Status: actively maintained
Official site: https://zeronet.io
    
Real‑time dynamic websites without central servers. Combine with Tor for anonymity. Great for uncensorable blogs, forums, and databases.

6. RetroShare – Friend‑to‑friend secure communication

Type: F2F (friend‑to‑friend), encrypted
Year: 2006
Core: PGP‑based authentication, encrypted tunnels
Network: only connects to trusted friends (no global peers)
Services: forums, channels, mail, VoIP, file sharing, Tor/I2P integration
Anonymity: relies on Tor or I2P for outbound connections; otherwise pseudonymous
Platform: Linux, Windows, macOS, Android (port)
Official site: https://retroshare.cc
    
Strong social graph–based privacy; no central servers. Excellent for private groups; can use Tor as proxy for more anonymity.

7. Mixmaster & Mixminion – High‑latency remailers

Mixmaster (1995):
  - Anonymous remailer (email)
  - High‑latency mix network, fixed‑size messages
  - Supports multiple hops and random delays
Mixminion (2002–2011):
  - Successor, uses single‑use reply blocks (SURBs)
  - Exit policies, modular design
  - No longer maintained but historically significant
Type: high‑latency mix network
Use: anonymous email, resistant to traffic analysis
    
High‑latency mixes provide stronger anonymity against global passive adversaries than low‑latency systems; used in anonymous email and whistleblowing.

8. Java Anon Proxy (JAP/JonDonym) – Mix cascade

Year: 2000
Type: mix cascade (fixed‑size, fixed‑order relays)
Trust model: one mix operator controls full cascade (controversial)
Services: HTTP proxy, SOCKS, premium paid version
Status: service discontinued (2016), code available
    
Early mix cascade design; illustrated trade‑offs between anonymity and trust in a single cascade operator.

9. Loopix – Low‑latency mix network

Year: 2017 (academic)
Type: low‑latency stratified mix network
Key features:
  - Poisson‑based mixing delays
  - Cover traffic to hide real messages
  - Provider‑based architecture (mix nodes and clients)
  - Strong anonymity against global passive adversaries
Status: research prototype, not deployed at scale
Paper: "Loopix: An Anonymous Communication System with Low Latency and High Throughput"
    
Combines low latency with strong anonymity guarantees; influences next‑gen mix net designs like Nym.

10. Vuvuzela – Metadata‑private messaging

Year: 2015 (academic)
Type: messaging system with differential privacy
Technique: all users send constant‑rate dummy traffic; servers cannot tell who talks to whom
Scalability: limited to small groups (~100 users)
Goal: provable metadata privacy, not just IP anonymity
    
Pioneered practical metadata‑private systems; its ideas (cover traffic, differential privacy) are used in modern private messaging.

11. Riffle – Verifiable shuffle anonymity

Year: 2016
Type: mix network using verifiable shuffle
Key tech: each server shuffles messages and proves correct behaviour via zero‑knowledge proofs
Low latency: suitable for file sharing and messaging
Status: research project, not live network
    
Demonstrates that verifiable shuffles can provide strong anonymity with low overhead; important cryptographic milestone.

12. Hornet – High‑speed onion routing

Year: 2015
Type: onion routing with improved performance
Core idea: symmetric‑key only setup (no per‑hop public‑key operations after circuit creation)
Throughput: claimed 93 Gbps on commodity hardware
Status: research prototype, not deployed
Paper: "HORNET: High‑speed Onion Routing at the Network Layer"
    
Shows that onion routing can be extremely fast, paving way for high‑bandwidth anonymous networks.

13. Crowds – Anonymity through blending into a crowd

Year: 1998
Concept: users forward requests to random group members; web server sees all users as a "crowd"
Anonymity: weak against global observers, decent against local eavesdroppers
Status: historical, no current implementation
    
Early fundamental concept; demonstrates how non‑hierarchical forwarding can hide origin.

14. Tarzan – P2P IP anonymizer

Year: 2002
Type: P2P mix network
Features: all participants act as mix nodes; uses layered encryption
Status: deprecated, replaced by Tor/I2P concepts
    
One of the first P2P anonymity designs; influenced later decentralized systems.

15. I2P-Bote – Serverless encrypted email on I2P

Type: overlay on I2P
Crypto: end‑to‑end encryption, DHT for storage
Anonymity: leverages I2P tunnels for sender/receiver
Status: stable, part of I2P package
    
Fully decentralized email without central servers; resistant to censorship and surveillance.

16. Other Networks & Concepts (Wikipedia sub‑categories)

- JonDonym (successor of JAP): premium mix cascade service (shut down)
- Privoxy: filtering web proxy, often used with Tor (not an anonymity network itself)
- AnoNet: experimental IP‑over‑onion network
- Phantom Anonymity Protocol: theoretical
- Mix network (general): category of high‑latency systems
- Onion routing (general): Tor's routing method
- Garlic routing: I2P's routing method
- Anonymous P2P: includes many file‑sharing networks (e.g., MUTE, AntsP2P)
- Darknet (file sharing): closed friend‑to‑friend networks (Waste, etc.)
    
Complete landscape shows the evolution of anonymity tech and helps you choose the right tool for any privacy requirement.

Comprehensive Anonymity Network Comparison (Key Metrics)

NetworkLatencyThroughputScalabilityAnonymity StrengthBest Use
TorLowMediumHigh (7000 relays)Moderate (against local adversary)Web browsing, hidden services
I2PMediumLow-MediumHigh (all participants)Moderate-High (internal)Internal services, file sharing
FreenetHighLowMediumHigh (darknet mode)Censorship-resistant publishing
GNUnetVariableVariableLow (experimental)High (design)Research, secure apps
ZeroNetLowMediumMediumLow (unless +Tor)Decentralized websites
RetroShareLowMediumLow (friend-based)High (within circle)Private group communication
MixmasterHighVery LowLowVery HighAnonymous email
LoopixLow-MediumMediumMedium (theoretical)High (cover traffic)Future private messaging
VuvuzelaLowVery LowVery LowMetadata privateSmall group chat
RiffleLowHighMedium (research)High (provable)File sharing, messaging
HornetLowVery HighMedium (research)ModerateHigh‑speed anonymous routing
One‑glance reference to match your threat model and performance needs.

Mix Network Fundamentals (High‑latency anonymity)

- Messages are delayed and reordered by each mix node
- Fixed‑size messages (padding) to prevent size correlation
- Mix cascade: fixed set of mixes, strict order
- Free‑route mix: any node can be next hop
- Provides resistance to global passive adversary
- Example: Chaum's mix (1981), Mixmaster, Mixminion
    
Foundation of modern anonymous communication; Tor's onion routing draws from these principles.

Onion Routing Deep Dive (Tor base)

- Circuit creation: client picks three relays, negotiates symmetric keys via telescoping or single‑pass (Tor)
- Each relay knows only predecessor and successor (onion encryption)
- Perfect forward secrecy (PFS) via ephemeral Diffie‑Hellman (ntor)
- Cells: fixed‑size 514‑byte packets to resist traffic analysis
- Circuit types: exit circuits, internal circuits (hidden services)
    
Core of Tor; understanding it helps optimize hidden services and develop new applications.

Garlic Routing (I2P core)

- Bundles multiple messages ("cloves") into one garlic clove
- Cloves may be for different destinations or future times (delayed)
- Adds uncertainty and mixing within a single tunnel message
- Combined with unidirectional tunnels (inbound/outbound) for separation
    
Enhances resistance to timing correlation compared to pure onion routing.

Key Anonymous Communication Papers from Wikipedia

Academic sources validate claims and offer deeper technical insight.

How to Choose the Right Anonymity Network

Helps practitioners pick the tool that matches their threat model, latency tolerance, and required features.

All Wikipedia Anonymity Networks – Official Links

Direct official sites and Wikipedia pages for further research.