summaryrefslogtreecommitdiff
path: root/src/config/README
blob: 4553325e57f76da80a7e8337e8d237cec3a88560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
This directory has configuration files that ship with Tor.  They include:

geoip
geoip6

    Geoip files for IPv4 and IPv6

torrc.minimal, torrc.sample:

    generated from torrc.minimal.in and torrc.sample.in by autoconf.

torrc.minimal.in:

    A very small torrc, suitable for installation by default in
    /etc/tor/torrc.

    We try to change torrc.minimal.in as infrequently as possible,
    since doing so makes the users of many packages have to re-build
    their torrc files.


torrc.minimal.in-staging

    This is where we stage changes to torrc.minimal.in over time so
    that when we have a change large enough to warrant a new
    torrc.minimal.in, we can copy all the other changes over
    wholesale.

torrc.sample.in:

    A verbose, discursive, batteries-included torrc.  Suitable for
    letting people know how to set up various options, including those
    most people shouldn't mess with.


==============================

On the geoip format:

Our geoip files are line-oriented. Any empty line, or line starting
with a #, is ignored.

All other lines are composed of three comma-separated values:
START,END,CC. For the geoip file, START and END are IPv4 addresses
as expressed as 32-bit integers (such as 3325256709 to represent
198.51.100.5). For the geoip6 file, START and END are IPv6
addresses, with no brackets. In both cases CC is a two-character
country code.

The semantic meaning of a line START,END,CC is that all addresses
between START and END _inclusive_ should be mapped to the country code
CC.

We guarantee that all entries within these files are disjoint --
that is, there is no address that is matched by more than one
line. We also guarantee that all entries within these files are
sorted in numerically ascending order by address.

Thus, one effective search algorithm here is to perform a binary
search on all the entries in the file.

Note that there _are_ "gaps" in these databases: not every possible
address maps to a country code. In those cases, Tor reports the
country as ??.