On Mon, Sep 04, 2006 at 12:19:27AM -0700, Joe Clark wrote:
> I don't want to be rude, but please answer my little question.
> Joe Clark
> Dear TOR users:
> I got a pretty newbie question to you guys:
> From where does TOR client take its routers' database ?
The directory protocol is described at
> In v-0.1.0.17 it was a file called "cached-directory". I upgraded
> to v-0.1.1.23 and I noticed some changes in the filename
> ("cached-routers" ?!) and in the file format.
Indeed you did. The old protocol is at
The storage format is undocumented, and intentionally so: we may
change it without warning, so please don't rely on it. But basically,
the old format was just to store a raw directory to disk. The new
format is to store a network status document for each authority in a
file named cached-status/
(with the authority's
fingerprint given in hex); and to store the router descriptors
concatenated in cached-routers and cached-routers.new. The latter is
append-only, and used as a journal; periodically, we prune out unused
router descriptors and regenerate cached-routers.
The source (in routerlist.c) should have full information.