Anonymity Integration Guide
Technology: anonymity · Category: tooling · Last reviewed: 2026-10-20
Source: https://tech-stack.codeamanilabs.org/guide/anonymity
Insight:
Anonymity is a property of a system under a stated adversary, never a product you install. The engineering job is subtractive: every identifier you never collect, every log line you never write, and every third-party script you never ship is anonymity you don't have to defend later. This guide is the audited, current replacement for a decade of stale "install Tor and you're invisible" folklore. As of October 2026 the sharpest new edge is that C tor 0.4.8 and older no longer work on the Tor network (cut-off 1 Sept 2026), so any self-hosted onion service or bundled tor binary must be on 0.4.9+.
█████╗ ███╗ ██╗ ██████╗ ███╗ ██╗██╗ ██╗███╗ ███╗██╗████████╗██╗ ██╗
██╔══██╗████╗ ██║██╔═══██╗████╗ ██║╚██╗ ██╔╝████╗ ████║██║╚══██╔══╝╚██╗ ██╔╝
███████║██╔██╗ ██║██║ ██║██╔██╗ ██║ ╚████╔╝ ██╔████╔██║██║ ██║ ╚████╔╝
██╔══██║██║╚██╗██║██║ ██║██║╚██╗██║ ╚██╔╝ ██║╚██╔╝██║██║ ██║ ╚██╔╝
██║ ██║██║ ╚████║╚██████╔╝██║ ╚████║ ██║ ██║ ╚═╝ ██║██║ ██║ ██║
╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
Anonymity Integration Guide
Focus: Building systems that don't deanonymize the people who use them — threat modelling, metadata minimization, Tor/onion-service integration, and anonymous intake — plus a tool-by-tool audit correcting a decade of stale advice.
Overview
Anonymity is not a tool. It is a property of a system, measured against a named adversary. "Am I anonymous?" is an unanswerable question. "Can a passive observer of my ISP link this request to my legal identity?" is answerable, testable, and engineerable.
Three distinct properties get conflated constantly, and conflating them is the single most common failure in this space:
| Property | Question it answers | Broken by |
|---|---|---|
| Confidentiality | Can they read the content? | Weak/absent E2EE, backdoored endpoints |
| Privacy | Can they link content to behaviour? | Logging, tracking, data brokers |
| Anonymity | Can they link behaviour to an identity? | Metadata, correlation, one careless reuse |
Encryption gives you the first. It gives you neither of the other two. A perfectly encrypted message that arrives from your home IP, at a predictable hour, to a recipient only you contact, is not anonymous — and this is precisely how most real deanonymizations happen.
For codeAmani the practical surface is defensive: we build products used by riders, clinic patients, SACCO members, donors, and whistleblowers. Our job is to avoid collecting the identifiers that would deanonymize them, not to help anyone evade lawful process.
flowchart TD
A["Who is the adversary?"] --> B{"Capability"}
B -->|"Curious insider / scraper"| C["Data minimization<br/>access control · retention limits"]
B -->|"Commercial surveillance<br/>adtech · data brokers"| D["No 3rd-party scripts<br/>no SDK telemetry · IP truncation"]
B -->|"Network observer<br/>ISP · café wifi"| E["TLS + ECH · Tor<br/>pluggable transports"]
B -->|"Nation-state<br/>global passive adversary"| F["Compartmentalized OS<br/>Qubes-Whonix · Tails · burner hardware"]
C --> G["Anonymity set:<br/>how many people<br/>could this have been?"]
D --> G
E --> G
F --> G
The last box is the one that matters. Anonymity is a crowd property. You are only as anonymous as the number of people who look identical to you. Every "optimization" that makes you unusual — a rare font set, a custom user-agent, a niche browser extension, a hand-edited about:config pref — shrinks your crowd and hurts you. This inverts most people's intuition and is the reason the audit below rejects so much traditional "hardening" advice.
Official Documentation
| Resource | URL |
|---|---|
| Onion services (operator docs) | https://community.torproject.org/onion-services/ |
| Tor protocol specifications | https://spec.torproject.org/ |
| Tor Support portal (absorbed the Tor Browser manual, Oct 2025) | https://support.torproject.org/ |
| Tails documentation | https://tails.net/doc/ |
| Whonix documentation | https://www.whonix.org/wiki/Documentation |
| SecureDrop (whistleblower intake) | https://securedrop.org/ |
| Arti (Rust Tor) client crate | https://docs.rs/arti-client |
| Privacy Guides (tool selection) | https://www.privacyguides.org/ |
tb-manual.torproject.orgnow 301-redirects to the Support portal. Update old links.
Current versions (verified 2026-10-20)
| Component | Current | Notes | Source |
|---|---|---|---|
| Tor Browser (stable) | 15.0.25 (12 Oct 2026) | Based on Firefox ESR 140. 16.0 is in alpha (16.0a14, ESR 153) | blog.torproject.org, dist.torproject.org |
| Mullvad Browser | 15.0.25 | Built by the Tor Project for Mullvad | dist.torproject.org/mullvadbrowser |
| C tor (stable) | 0.4.9.14 (7 Oct 2026) | 0.4.8 EOL 1 Jun 2026; 0.4.8 and older stopped working on the network 1 Sep 2026 | dist.torproject.org, blog "Sunsetting Tor 0.4.8" |
Arti (arti binary) |
2.7.0 (1 Oct 2026) | Security fixes; upgrade if running onion services | blog.torproject.org |
arti-client (Rust library) |
0.47.0 | Library API is still pre-1.0 — "expect a certain amount of breakage" | crates.io, docs.rs |
| Tails | 7.15 (13 Oct 2026) | Debian 13 "Trixie" base since 7.0; ships TB 15.0.25 + tor 0.4.9.14 | blog.torproject.org |
| Qubes OS | 4.3.2 | qubes-os.org/downloads | |
socks-proxy-agent (npm) |
10.1.0 | ESM-only since 9.0, Node ≥ 20 since 10.0 | npm, CHANGELOG |
undici (npm) |
8.12.3 | Ships an experimental Socks5ProxyAgent (since 7.23.0) |
npm, undici docs |
stem (PyPI) |
1.8.2 (June 2023) | Site states Stem is "mostly unmaintained" | stem.torproject.org |
PySocks (PyPI) |
1.7.1 | PyPI | |
| SecureDrop | 2.16.1 (Jul 2026) | securedrop.org/news | |
mat2 (PyPI) |
0.15.0 (Aug 2026) | Moved to GitHub (jvoisin/mat2); the 0xacab repo is archived |
PyPI |
@sentry/nextjs (npm) |
11.8.0 | v11 removed sendDefaultPii; unset dataCollection collects everything — see Log hygiene |
npm, Sentry v10→v11 migration guide |
The 2015 → 2026 audit
This guide was commissioned as an audit of Tor and the Dark Art of Anonymity (Lance Henderson, 2015 edition). The book's principles aged well; its tooling did not, and a meaningful fraction of its advice is now actively harmful.
Full chapter-by-chapter mapping lives in reference/book-audit-2015-to-2026.md. Headlines:
Actively harmful if followed today
| Book says | Reality in 2026 |
|---|---|
| Install CanvasBlocker, User-Agent Switcher, Ghostery, Adblock | Never add extensions to Tor Browser. Each one raises fingerprint entropy and shrinks your anonymity set. Tor Browser ships letterboxing and a uniform fingerprint by design — customizing it is self-defeating. |
| Use Chrome with ScriptNo/ScriptSafe/FlashControl | Chrome is not an anonymity browser and never was. Flash reached EOL Dec 2020. Use Tor Browser, or Mullvad Browser (Tor Browser's fingerprint protections without the Tor network) for VPN use. |
| Manually configure NoScript per-site | Per-site whitelists are themselves a fingerprint. Use the built-in Security Level (Standard / Safer / Safest) and nothing else. Since Tor Browser 15.0, NoScript also blocks WebAssembly at Safer/Safest; hand-editing javascript.options.wasm turns your level into "Custom" and makes you more unique. |
| Pay for a VPN anonymously, chain it with Tor | VPN+Tor generally does not improve anonymity and often harms it. Use Tor's bridges + pluggable transports for censorship, not a VPN hop. |
| Use Bitcoin mixers (BitFog et al.) for anonymity | Bitcoin is pseudonymous, not anonymous; chain analysis is a mature industry. Mixing now carries severe legal exposure — Samourai Wallet's founders were sentenced to 5 and 4 years (Nov 2025), even as OFAC delisted Tornado Cash in March 2025. |
| Generate keys at Brainwallet.org | Brainwallets are catastrophically insecure and were mass-drained. Never generate key material in a web page. |
Dead, renamed, or superseded
| Book (2015) | Status | Modern equivalent |
|---|---|---|
| Torbutton, HTTPS Everywhere | Merged into Tor Browser core; HTTPS Everywhere retired Jan 2023 | Built-in Security Level + HTTPS-Only Mode |
| v2 .onion addresses (16 char) | Removed from Tor, Oct 2021 | v3 onions — 56 char, ed25519/SHA3 |
| Shallot / Scallion (v2 vanity) | Dead with v2 | mkp224o (v3 ed25519 vanity) |
| TextSecure + RedPhone | Merged into Signal (2015) | Signal — PQXDH (2023) + SPQR "Triple Ratchet" (Oct 2025) |
| CryptoCat, Torchat, ChatSecure | Discontinued / unmaintained | SimpleX, Briar, Cwtch (metadata-resistant) |
| Tor Instant Messaging Bundle | Cancelled — never shipped | as above |
| TrueCrypt | Discontinued 2014 | VeraCrypt, LUKS2, BitLocker, FileVault |
| TorBirdy, Enigmail | Discontinued 2020 | Thunderbird built-in OpenPGP |
| Freenet + Frost + Fuqid | Renamed Hyphanet (2023); front-ends abandoned | Hyphanet, I2P, Nym mixnet |
| MultiBit, MultiSigna, most listed exchanges | Defunct | — |
| Darkcoin | Renamed Dash (2015); PrivateSend is opt-in CoinJoin, not anonymity | Monero if privacy is the actual requirement |
| Panopticlick | Renamed | EFF Cover Your Tracks |
| Skype | Retired May 2025 | Signal |
| Macchanger as a manual step | MAC randomization is now default in iOS 14+, Android 10+, Windows 10+, NetworkManager | (nothing to do) |
| Tor Browser Manual site | Merged into the Support portal (Oct 2025) | support.torproject.org |
Missing entirely from the book — and now central
Qubes OS (compartmentalization by virtualization; Qubes-Whonix is the strongest widely-available desktop posture) · GrapheneOS (hardened Android) · Snowflake / WebTunnel / Conjure pluggable transports · Tor VPN Beta for Android (per-app Tor circuits, Cure53-audited April 2026 — still beta) · Arti (Rust Tor; arti 2.x binary, arti-client 0.x library) · Counter Galois Onion (CGO), Tor's new relay-crypto design (stable in Arti 2.5, June 2026) · Post-quantum crypto (NIST FIPS 203/204/205, Aug 2024) · Commercial spyware (Pegasus, Predator, Graphite) as the realistic high-end threat, answered by iOS Lockdown Mode / Android Advanced Protection · Data brokers and SDK-based location resale, which deanonymize at scale far more cheaply than any SIGINT program · SecureDrop / Hush Line for anonymous intake.
Also notable: Tails merged into the Tor Project in September 2024 — they are now one organization, and Tails releases are announced on the Tor blog.
Deliberately not modernized
The book's chapters on darknet-market escrow, "finalize early" tactics, evading law enforcement, and running hidden marketplaces are out of scope and intentionally left un-updated. They are operational crime guidance, not privacy engineering, and much of the surrounding ecosystem they describe (Silk Road 2.0, Agora, Blackbank, Sheep) was seized or exit-scammed within a year of publication. This guide covers the defensive and civil-liberties surface only: protecting users, journalists, and at-risk people from surveillance.
What the book got right, and still is
Worth preserving explicitly, because it's the durable part:
- You are the weak link. Nearly all real deanonymization is operational error, not broken cryptography.
- Compartmentalize identities absolutely. One reused username, one shared email, one crossed session collapses the whole construction.
- Correlation is the attack. Volunteering location, weather, local events, or timing patterns deanonymizes more people than exploits do.
- A stated threat model must precede tool selection. The book's instinct to ask "how far will you fall if caught?" before choosing tools is exactly right.
- Backdoors are security holes in 100% of cases. Still the correct position, and still contested — the UK's Technical Capability Notice led Apple to withdraw Advanced Data Protection for UK users in Feb 2025; a narrower UK-only notice followed, and Apple filed a fresh legal challenge in Aug 2026. ADP remains unavailable to UK users.
Setup
Running a local Tor client
Everything below assumes a Tor SOCKS5 proxy on 127.0.0.1:9050 (daemon) or 9150 (Tor Browser).
# macOS (Homebrew ships 0.4.9.14 as of 2026-10-20)
brew install tor && brew services start tor
# Debian / Ubuntu — distro security updates now carry 0.4.9.x; for the newest
# stable, use the Tor Project's own repo (deb.torproject.org, see Support portal)
sudo apt install tor && sudo systemctl enable --now tor
# MUST be 0.4.9 or newer — 0.4.8 and older no longer work on the network
tor --version
# Verify: should return {"IsTor":true,...}
curl -s --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip
--socks5-hostname(not--socks5) is load-bearing: it sends DNS resolution through the proxy. Plain--socks5resolves DNS locally and leaks every hostname you visit to your resolver — a total anonymity failure that still looks like it's working.
Version cliff. Tor 0.4.8 reached end of life on 1 June 2026, and the Tor Project removed directory fields (TAP onion keys, family lines) that 0.4.8 needs, so 0.4.8-and-older clients and onion services stopped working after 1 September 2026. Any Docker image, embedded binary, or forgotten VPS running an older tor is now silently offline. Pin
tor >= 0.4.9in images and checktor --versionin CI.
Node — routing requests through Tor
npm install socks-proxy-agent@10 axios
socks-proxy-agent 10.x is ESM-only and requires Node ≥ 20 (9.0 converted to ESM; 10.0 raised the Node floor). Projects still on CommonJS need import() or must stay on 8.x. It implements Node's http.Agent, so it works with anything built on http/https — axios, node-fetch, got:
import axios from "axios";
import { SocksProxyAgent } from "socks-proxy-agent";
// socks5h:// = resolve DNS at the proxy. socks5:// leaks DNS locally.
const agent = new SocksProxyAgent("socks5h://127.0.0.1:9050");
const { data } = await axios.get<{ IsTor: boolean; IP: string }>(
"https://check.torproject.org/api/ip",
{ httpAgent: agent, httpsAgent: agent },
);
console.log(data.IsTor); // true
In
socks-proxy-agent, the scheme decides where DNS happens:socks5h://and baresocks://resolve at the proxy;socks5://andsocks4://resolve locally. Always writesocks5h://explicitly.
Native fetch — use undici's dispatcher, never agent
Node's native fetch silently ignores agent. It is undici, which only honours a dispatcher. Passing { agent } does not error — it just sends the request over your real IP. Node 24's built-in env-proxy support (NODE_USE_ENV_PROXY / --use-env-proxy) covers HTTP(S) proxies only, not SOCKS, so it cannot route through Tor either.
undici (npm, ≥ 7.23) now ships Socks5ProxyAgent, marked Stability: 1 – Experimental (it prints an ExperimentalWarning):
import { fetch, Socks5ProxyAgent } from "undici";
// NOTE: undici accepts only socks5:// or socks:// (it rejects socks5h://),
// and ALWAYS sends the hostname to the proxy — DNS is resolved by Tor.
const tor = new Socks5ProxyAgent("socks5://127.0.0.1:9050");
const res = await fetch("https://check.torproject.org/api/ip", { dispatcher: tor });
const body = (await res.json()) as { IsTor: boolean };
if (!body.IsTor) throw new Error("Refusing to proceed: traffic is not over Tor");
The two libraries spell remote DNS differently — socks5h:// for socks-proxy-agent/curl/requests, socks5:// for undici — so a blanket rg 'socks5://' lint will flag undici correctly-configured code. Prefer one egress library per codebase (default: socks-proxy-agent + axios, which is stable) and scope the lint accordingly.
Fail closed, so a misconfiguration can never fall back to a direct connection:
import axios from "axios";
import type { SocksProxyAgent } from "socks-proxy-agent";
export async function assertTor(agent: SocksProxyAgent): Promise<void> {
const { data } = await axios.get<{ IsTor: boolean }>(
"https://check.torproject.org/api/ip",
{ httpAgent: agent, httpsAgent: agent, timeout: 15_000 },
);
if (!data.IsTor) throw new Error("Refusing to proceed: traffic is not over Tor");
}
A runnable, type-checked version lives in examples/tor-egress/.
Python — controller access with Stem
stem is the Tor Project's controller library — use it to build circuits, rotate identity, and publish onion services programmatically. Its own site now says Stem is "mostly unmaintained" (last release 1.8.2, June 2023). The control-port protocol it speaks is stable, so it still works for basic tasks like NEWNYM, but don't build new long-lived infrastructure on it; Arti's RPC interface is where the Tor Project is investing.
pip install stem pysocks "requests[socks]"
import requests
from stem import Signal
from stem.control import Controller
# socks5h:// -> DNS resolved by Tor, not locally
PROXIES = {"http": "socks5h://127.0.0.1:9050",
"https": "socks5h://127.0.0.1:9050"}
print(requests.get("https://check.torproject.org/api/ip", proxies=PROXIES).json())
# Request a fresh circuit (rate-limited by Tor to roughly one per 10s)
with Controller.from_port(port=9051) as c:
c.authenticate() # cookie auth by default
c.signal(Signal.NEWNYM)
NEWNYMgives you a new circuit, not a new identity. Cookies, local storage, a logged-in session, and browser fingerprint all survive it. Treat it as changing your exit IP and nothing more.
Publishing a v3 onion service
Onion services give both parties anonymity and provide authenticated, end-to-end encrypted transport with no CA involved — the .onion address is the public key.
# /etc/tor/torrc
HiddenServiceDir /var/lib/tor/my_service/
HiddenServicePort 80 127.0.0.1:8080
# Proof-of-work DoS defense (C tor 0.4.8.1+; still opt-in, default 0)
HiddenServicePoWDefensesEnabled 1
# Optional tuning (defaults shown): rendezvous requests/sec and burst
# HiddenServicePoWQueueRate 250
# HiddenServicePoWQueueBurst 2500
# PoW needs the "pow" module, which is only compiled in with --enable-gpl
tor --list-modules # expect: pow: yes
sudo systemctl reload tor
sudo cat /var/lib/tor/my_service/hostname # -> <56-char>.onion
If tor --list-modules shows pow: no, the HiddenServicePoWDefensesEnabled line does nothing — distro builds vary, so check rather than assume.
The directory now holds hs_ed25519_secret_key, hs_ed25519_public_key, and hostname. hs_ed25519_secret_key is the identity — anyone who copies it can impersonate the service permanently. Back it up encrypted; never commit it; mode 0600, owned by the tor user.
Restrict access to named clients (formerly "client authorization", now restricted discovery) by dropping one public key per file into authorized_clients/:
# /var/lib/tor/my_service/authorized_clients/alice.auth (one line per file)
descriptor:x25519:<BASE32_PUBKEY>
Bind the backend to loopback only (127.0.0.1:8080). An onion service whose origin is also reachable on a public IP is trivially correlated and defeats the entire construction — this is how several high-profile services were located.
Arti as the onion host. Arti can run onion services (onion-service-service feature) and Arti 1.7 added restricted discovery. It's the long-term direction, but arti-client is still pre-1.0 and Arti 2.7.0 shipped fixes for low-to-high-severity security issues "especially [for] those running onion services". For a production public service today, C tor 0.4.9 remains the conservative choice; track Arti release notes before switching.
Vanity addresses
Shallot and Scallion from the book only ever produced v2 addresses and are dead. The v3 tool is mkp224o (needs libsodium):
git clone https://github.com/cathugger/mkp224o && cd mkp224o
./autogen.sh && ./configure && make
./mkp224o -d ./out amani # addresses beginning "amani"
Difficulty is exponential in prefix length — 6 characters is quick, 8 is hours, and beyond that is a research budget. A vanity prefix is branding, not security: users must still verify the full 56-character address.
Key patterns
Don't blanket-block Tor exit nodes
The most common way a product harms at-risk users is invisible: a WAF rule or a fraud vendor silently blocking every Tor exit. That locks out journalists, abuse survivors, and people under censorship — the exact users who need you most.
// Tier by ACTION, not by network origin.
// Tor traffic is not fraud; it is traffic whose origin you cannot see.
type Tier = "open" | "challenge" | "deny";
export function riskTier(req: Request, knownAbusive: boolean): Tier {
if (req.method === "GET" || req.method === "HEAD") return "open"; // never block reading
if (knownAbusive) return "deny"; // only for observed abusive patterns
return "challenge"; // mutations: proof-of-work / captcha
}
Rate-limit on a session or workload token, never on IP alone — IP-based limits punish everyone behind one exit node and are trivially evaded by anyone who matters.
Log hygiene — the leak that survives every other control
Most deanonymization risk in a normal SaaS lives in logs, not in the network.
/** Truncate IPs before they are ever written. IPv4 -> /24, IPv6 -> /48. */
export function coarseIp(ip: string): string {
if (ip.includes(":")) return ip.split(":").slice(0, 3).join(":") + "::/48";
return ip.split(".").slice(0, 3).join(".") + ".0/24";
}
const PII = /(\+?254\d{9})|([\w.+-]+@[\w-]+\.[\w.]+)|(\b[A-Z]{2}\d{6}\b)/g;
export const scrub = (s: string): string => s.replace(PII, "[redacted]");
Apply it at the boundary — Sentry beforeSend, the logger transport, and analytics — so no code path can bypass it.
Sentry SDK v11 inverted the privacy default.
sendDefaultPiiwas removed and replaced bydataCollection. In v10 an unsetsendDefaultPiiwas restrictive; in v11 an unsetdataCollectioncollects everything — user info and IP inference, cookies, request/response headers and bodies, query params, DB query data, GenAI inputs/outputs, stack-frame local variables. Any project upgraded from v10 that simply deletedsendDefaultPii: falseis now shipping PII. Set every category explicitly:
import * as Sentry from "@sentry/nextjs"; // 11.x
Sentry.init({
dsn: process.env.SENTRY_DSN,
// v11: replaces `sendDefaultPii: false`. Stricter than the v10 default.
dataCollection: {
userInfo: false, // no user.* auto-fill, no IP inference
cookies: false,
httpHeaders: false,
httpBodies: [],
urlQueryParams: false,
genAI: { inputs: false, outputs: false },
databaseQueryData: false,
queues: false,
graphQL: { document: false, variables: false },
stackFrameVariables: false,
},
beforeSend(event) {
if (event.user) { delete event.user.ip_address; delete event.user.email; }
return JSON.parse(scrub(JSON.stringify(event))) as typeof event;
},
});
Timing and volume are identifiers
An "anonymous" report submitted at 14:03 from a clinic that has four staff is not anonymous. Where the anonymity set is small, add jitter and batching rather than delivering immediately:
// Release anonymous submissions on a fixed cadence so submission time
// carries no information about event time.
const BATCH_WINDOW_MS = 60 * 60 * 1000;
export const releaseAt = (t: number): number =>
Math.ceil(t / BATCH_WINDOW_MS) * BATCH_WINDOW_MS;
Strip file metadata on upload
Photos carry GPS coordinates, device serials, and timestamps. For any user-supplied image, re-encode server-side and drop all EXIF — never trust the client to have done it.
import sharp from "sharp";
// sharp strips all metadata by default unless you call keepMetadata()/withMetadata();
// rotate() first so orientation survives the metadata loss.
export const sanitize = (buf: Buffer): Promise<Buffer> =>
sharp(buf).rotate().toFormat("webp", { quality: 82 }).toBuffer();
For PDFs and office documents use mat2 (now maintained at github.com/jvoisin/mat2, 0.15.0) in a sandboxed worker.
Anonymous intake
For genuine whistleblower or abuse-report intake, do not roll your own. Use SecureDrop (onion-based, hardened, designed for newsrooms; 2.16.1 as of Jul 2026) or Hush Line (a managed tip-line service) for a lighter-weight option. A bespoke "anonymous form" on your main domain shares TLS fingerprints, CDN logs, and analytics with the rest of your product, and almost always leaks.
Recommending tools to users (Oct 2026)
When product copy or a help page has to point at-risk users somewhere, point them at maintained, primary sources:
| Need | Recommend | Avoid |
|---|---|---|
| Anonymous browsing | Tor Browser stable, unmodified, Security Level slider only | Alpha channel for at-risk users (Tor's own warning); extensions |
| Fingerprint-resistant browsing on a VPN | Mullvad Browser | "Hardened" Chrome |
| Whole-device protection on Android in censored regions | Tor VPN Beta (per-app circuits) — label it beta | Commercial "free VPN" apps |
| Amnesic OS | Tails 7.x (write the USB image, verify it; auto-upgrade from 7.0+) | Tails Installer / DVD flows from old guides |
| Strongest desktop compartmentalization | Qubes OS 4.3 + Whonix | Single-OS "hardening" checklists |
| VPN (privacy, not anonymity) | Privacy Guides' list: IVPN, Mullvad, Proton VPN | VPN-then-Tor chains |
| Messaging | Signal; SimpleX / Briar / Cwtch where phone-number linkage is the threat | Telegram (not E2EE by default) |
| Censorship circumvention | Tor bridges: Snowflake, WebTunnel, obfs4, Conjure | A VPN hop in front of Tor |
Mullvad note (Oct 2026). A political donation by a Mullvad co-founder prompted community pressure on the Tor Project. On 9 Oct 2026 Tor said it is continuing the technical collaboration (the Tor Project builds Mullvad Browser) but paused co-branding and revised endorsement language. This changes nothing about Mullvad Browser's technical properties; it's a values call for each organization recommending it. codeAmani's technical recommendation is unchanged.
codeAmani notes
Security
- Secrets stay server-side. Anonymity tooling changes nothing about this — see [[hazina-vault]] for the vault model. Never ship a key to the client because "the traffic is over Tor."
- Onion service private keys are identity.
hs_ed25519_secret_keybelongs in Hazina or an encrypted backup, never in the repo. Addhs_ed25519_secret_keyand*.auth_privateto.gitignoreon any project that publishes one. - Remote DNS, always.
socks5h://forsocks-proxy-agent, curl and Pythonrequests; undici'sSocks5ProxyAgentresolves remotely by design withsocks5://. Grep for it in review, scoped to the library in use. - Sentry v11 collects PII by default. Every project on
@sentry/*11.x must setdataCollectionexplicitly (block above); grep upgraded repos for a leftoversendDefaultPii, which v11 ignores. - Pin
tor >= 0.4.9in any Dockerfile, CI image or VPS that runs a tor daemon. Older versions no longer connect. - Keep verifying webhook signatures (Stripe, Svix, M-Pesa) exactly as before — anonymity work never relaxes an authentication control.
US-first defaults
codeAmani's customers are primarily in the US, where the realistic adversaries for most products are commercial surveillance (adtech, data brokers, SDK location resale) and civil subpoenas against us as the provider. That makes data minimization, short retention, zero third-party scripts and IP truncation the highest-value controls — far more than Tor integration. Payments stay on Stripe; never put a Stripe customer ID, PaymentIntent ID or email into logs or analytics events.
African-market and Kenya-targeted projects
This is where the guide earns its keep, because our Kenya-targeted builds collect precisely the identifiers that deanonymize:
- Phone numbers are national identity. A
254XXXXXXXXXnumber is linked to a SIM registration under Kenyan law, which is linked to an ID. Inboda-dispatch,duka-order-bot, andclinic-salon-booking, the phone number is the identity — treat it as such. Hash it for joins, store it once, and never put it in logs, URLs, or analytics events. - GPS traces are re-identifying even when "anonymized." A rider's home and first pickup of the day identify them uniquely within days. Truncate stored coordinates to the precision the feature actually needs, and expire raw traces aggressively.
- M-Pesa
CheckoutRequestIDand till numbers are strong linkers. Keep them out of client-side state and error reports. (M-Pesa is the payment rail only on Kenya-targeted projects; Stripe is the default everywhere else.) - KDPA 2019 requires data minimization and purpose limitation, and gives data subjects erasure rights — a schema that scatters phone numbers across five tables makes compliance expensive. Design for deletion on day one.
- Low-bandwidth reality reinforces the right answer. Third-party trackers and heavy SDKs are both a privacy liability and a 2G/3G performance problem. Shipping zero third-party scripts is the rare choice that is simultaneously faster, cheaper, and more private. The 0.4.9 directory change (dropping TAP keys and family lines) also makes Tor bootstrap faster on slow links.
AI routing
- Route anonymity/threat-model reasoning to Anthropic Claude (this guide's own audit was produced that way).
- Never send user PII to any model provider to "anonymize" it — redact deterministically with regex/NER before the call, as in
scrub()above. A model is not a redaction control; it is a network egress. - Self-host via [[hugging-face]] or run open weights through [[together-ai]] when the input is sensitive enough that a third-party API call is itself the leak.
Where this guide fits
- Coding-agent blueprint:
examples/AGENTS.md— portable rules for Claude Code, Grok Build, and Cursor, with per-tool adapters alongside it. - Runnable egress example:
examples/tor-egress/ - Full book audit:
reference/book-audit-2015-to-2026.md - Threat-model worksheet:
reference/threat-model-worksheet.md - Recipes:
PATTERNS.md· Links:RESOURCES.md· Gotchas:NOTES.md
Scope statement. This guide covers defensive privacy engineering, censorship circumvention, and protection of at-risk users — journalists, abuse survivors, whistleblowers, and people under repressive governments. It deliberately excludes operational guidance for evading lawful investigation, and does not modernize the source book's darknet-marketplace chapters.
Official docs: