Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time



The `` script is written as part as the effort to provide
financial support to partner organizations.

This script will analyze archives of Tor network statuses in order to
share a monthly amount of money between organizations. Each share is
calculated using two factors

 * how much bandwidth an organization have contributed to the network,
 * the location of its exit nodes.


    ./exit-funding YYYY-MM MONTHLY_AMOUNT

:    The month for which the computation must be done.

:    The round amount of euros shared between partners organization for
     the given month.

The script will put *uncompressed* metrics data file in the `archives`
subdirectory. Watch out, this can take up more than a gigabyte of disk space!

The result of parsing metrics data will be cached. To start the parsing
process again, please remove the cache file named like


External dependencies:

 * PrettyTable <>

On a Debian system, issue the following command:

    apt-get install python-prettytable

On anything else, the following should work:

    pip install PrettyTable


The script will read its configuration from two files written
using the YAML format:

partners.yaml: partners organizations

The file `partners.yaml` contains a description of the partners organizations.

For each organization, a stanza must be added, e.g.:

      name: Zwiebelfreunde e.V.
        - <support .AT. torservers .DOT. net>

:    An identifier for the organization. Do not use fancy characters.

:    The full name of the organization.

:    A list of every string that can appear in the contact field for relays
     run by the organization.

country-factors.yaml: incentive factors by countries

The file `country-factors.yaml` contains a table of country code and
their associated incentive factor.

Here's an excerpt:

    cn: 2.127412
    ru: 1.909634
    nl: 0.885657
    pt: 2.155738

Contact name is common identifier for the family. List of contact names for
each partners.

The scripts `` and ``
are both attempts to produce country factor tables that depends on
the current exit probabilities of each country.

Misc. implementation notes

This script will use uncompressed archives from

Archives from metrics are compressed with bzip2. Due to limitations in Python,
parsing compressed metrics data with Stem is very very very slow. Using
uncompressed archives overcome this issue.

Authors and licensing information

:    Copyright © Lunar <>  
     Licensed under Expat (more commonly known as MIT)

:    Copyright © Lunar <>  
     Licensed under Expat (more commonly known as MIT)

:    Copyright © 2013 Isis Agora Lovecruft, The Tor Project, Inc.  
     Licensed under Three-clause BSD


reimbursement script for exit relays



No releases published


No packages published


You can’t perform that action at this time.