开源 Tor 协议技术书发布 含 20 个实验

原标题:Anatomia Di Tor – The Tor Protocol, Byte by Byte
38AI 研判分

一本以意大利语撰写、采用 GPL-3.0 协议免费开源的 Tor 协议技术书发布,内容从两个中继之间交换的字节层面一直讲到设计取舍、真实攻击与开放问题,并附带 20 个可在私有 Tor 网络上重建并验证各机制的实验。作者说明该书在其编辑主导下由 AI 工具大量参与扩写、组织与图表代码草拟,且未经独立专家评审,欢迎读者提交勘误。

报道正文

本文目录5 个章节

Onion Routing Anatomy

Anatomia di Tor — The Tor Protocol, Byte by Byte

Book · Laboratories · Documentation · Contribute


English

A free, open-source technical book about the Tor protocol, written in Italian: how Tor works from the bytes two relays exchange up to design choices, real attacks and open problems — with twenty laboratories that rebuild and test each mechanism on a private Tor network.

Origin, method, and an invitation to contribute. This book builds on study documents I produced over several years, beginning with my bachelor's thesis. Under my editorial direction, AI tools made substantial contributions to expanding and organizing that material into the present technical narrative, as well as drafting figures, exercises, code, and laboratories. Despite technical checks, the book has not undergone independent expert review; mistakes may remain. Readers are invited to report them and submit corrections. I provide the work free of charge through the project's official channels under the GPL-3.0-or-later: "diffusione dei saperi senza fondare poteri" — spreading knowledge without establishing power. The license allows reuse and redistribution, including commercial redistribution, on its terms. See AI disclosure for the precise roles and limitations.

This is an open project: readers can report errors, improve explanations and contribute technical corrections or translations. → Help improve this book

31 chapters · 20 reproducible laboratories · 176 exercises with solutions · 39 figures

Download

Italian original — first edition

FormatFile
Read on screen · A4 PDF · 298 pagesOpen A4 PDF
E-reader · EPUB 3Open EPUB
Print a personal copy · 7×10 in PDF · 342 pagesOpen print PDF
CoverView cover

The Italian edition is free to read, download and share under the conditions of the GPL-3.0-or-later.

Official release: v1.0.0-it (seven files, SHA-256 checksums).

Zenodo (Italian edition): DOI 10.5281/zenodo.24207180.

Download the translated editions (version 1.0.0)

LanguagePDF A4PDF 7×10EPUB 3CoverZenodo
简体中文PDF A4PDF 7×10EPUBCoverDOI

What the book contains

  • Part I — History and foundations: anonymity and metadata, mix networks and remailers, from the NRL's onion routing to the Tor Project, Tor's threat model.
  • Part II — The protocol at a low level: cryptography for Tor, network architecture, channels and the link protocol, cells, circuit creation (CREATE_FAST, ntor, ntor-v3), layered relay encryption and CGO, streams, SENDME and congestion control, the directory system, path selection and guards, onion services v3, DoS defences, censorship, bridges and pluggable transports.
  • Part III — Tor in practice: torrc, the control port and Stem, a private Tor network, traffic analysis with Wireshark, onion services, relays and bridges, Tor Browser, Tails and Whonix, Tor Metrics and OONI, legal and ethical aspects in Italy and the EU.
  • Part IV — Attacks and defences: traffic correlation, fingerprinting and Sybil attacks, real cases, operational mistakes — with an analytical, defensive approach.
  • Part V — Research and future: academic research on Tor, Arti (Tor in Rust), open problems and proposals.

31 chapters, 4 appendices, 176 graded exercises with solutions, 39 original figures. Reference versions: tor 0.4.9.13, Arti 2.6.0.

These are fixed reference versions for study and laboratory reproducibility, not the versions recommended for use on the public Tor network. For real deployments, install releases that include current security updates.

Inside the book

These are actual pages from the Italian A4 PDF, not promotional mockups. The page numbers refer to the PDF file, not the printed pagination.

Cells and wire format · PDF page 63Telescopic circuit construction · PDF page 78
Book page showing fixed-length and variable-length Tor cellsBook page showing guard middle and exit circuit construction
Onion service rendezvous · PDF page 131Private Tor network · PDF page 170
Book page diagramming an onion-service rendezvousBook page showing a private Tor laboratory network

Open the complete A4 PDF · Provenance and SHA-256

Laboratories and reproducibility

Twenty laboratories build torlab, a small educational Tor client in Python, and run it against a private Tor network (tor and Chutney built from source in Docker, every listener on 127.0.0.1). On 28 October 2026 the Italian laboratories were rerun live: 53/53 checks, plus 14/14 for the obfs4 bridge laboratory (validation summaries).

BASH
make -C labs/it test        # offline tests (Python ≥ 3.11, pip install -r requirements.txt)
make -C labs/it immagine    # Docker image with tor and Chutney
make -C labs/it avvia       # start the private network
make verifica-lab           # rerun every laboratory and check its results

Experiments run only on the private network, never against public relays or real users. Guides: labs/it/wiki/. Building the book needs only Docker and make: make book-pdf, make book-epub, make book (details).

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)