Tor relay nearest neighbour ranking
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Initial commit May 11, 2016
LICENSE Initial commit May 11, 2016 Add dependency file. Jul 2, 2016
requirements.txt Add dependency file. Jul 2, 2016


Trnnr implements Tor relay nearest neighbour ranking. Given a reference Tor relay, the idea is to rank other Tor relays based on whose configuration is very similar to the reference relay. That includes relays that share a nickname, port, operating system, or bandwidth values. To install all dependencies, run:

pip install -r requirements.txt

To use this tool, you only need the fingerprint of a Tor relay whose nearest neighbours you want to see, e.g., 9B94CD0B7B8057EAF21BA7F023B7A1C8CA9CE645. Then, run the tool as follows:

./ 9B94CD0B7B8057EAF21BA7F023B7A1C8CA9CE645

The output is a list of CSV-formatted relays, one per line. The first column shows the Levenshtein distance. The smaller the number, the more similar the relay's configuration is to the reference relay.

To see the 10 most similar relays, run:

./ 9B94CD0B7B8057EAF21BA7F023B7A1C8CA9CE645 --top 10

Finally, to further visually highlight similarities in the output, run:

./ 9B94CD0B7B8057EAF21BA7F023B7A1C8CA9CE645 --top 10 --colour

This will result in output similar to the following image.

trnnr screenshot