Laboratories
Twenty laboratories build torlab, a small educational Tor client
written in Python, piece by piece: channel, cells, handshakes, encryption, streams,
directories, path selection, onion services and more.
A private Tor network
The code runs against a private Tor network that lives on one computer: tor 0.4.9.13 and Chutney built from source in a Docker image, with every listener bound to 127.0.0.1. Nothing leaves the machine.
The experiments are designed for this private network only. They are never run against public relays or real users, in line with the principles of the Tor Research Safety Board.
Verified, not only described
On 28 October 2026 all the Italian laboratories were rerun live on the private network: 53/53 checks passed, plus 14/14 for the obfs4 bridge laboratory. Offline tests cover the code and the scripts without Docker or network access. The validation summaries are in the repository.
Try it
git clone https://github.com/aleff-github/onion-routing-anatomy
cd onion-routing-anatomy
make -C labs/it test # offline tests (Python 3.11 or later)
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 the results
Step-by-step guides are in labs/it/wiki
(in Italian). Translated guides exist in labs/<language>/wiki as part of
the translations under review.
Something does not work as described? Report a laboratory problem.