Tor 0.4.9.0-alpha-dev
Tor source reference

Welcome to Tor

(For an up-to-date rendered copy of this documentation, see https://src-ref.docs.torproject.org/tor/index.html .)

This documentation describes the general structure of the Tor codebase, how it fits together, what functionality is available for extending Tor, and gives some notes on how Tor got that way. It also includes a reference for nearly every function, type, file, and module in the Tor source code. The high-level documentation is a work in progress.

Tor itself remains a work in progress too: We've been working on it for nearly two decades, and we've learned a lot about good coding since we first started. This means, however, that some of the older pieces of Tor will have some "code smell" in them that could stand a brisk refactoring. So when we describe a piece of code, we'll sometimes give a note on how it got that way, and whether we still think that's a good idea.

This document is not an overview of the Tor protocol. For that, see the design paper and the specifications at https://spec.torproject.org/ .

For more information about Tor's coding standards and some helpful development tools, see doc/HACKING in the Tor repository.

Topic-related documentation

A high-level overview

arch_goals

initialization

Data flow in the Tor process

certificates

threading

strings

time_periodic

configuration

publish_subscribe