Readme.md 2.51 KB
Newer Older
Arlo Breault's avatar
Arlo Breault committed
1
2
[![Build Status](https://travis-ci.org/arlolra/check.png?branch=master)](https://travis-ci.org/arlolra/check)

3
## A new check.torproject.org, hopefully
Arlo Breault's avatar
Arlo Breault committed
4

Arlo Breault's avatar
more nl    
Arlo Breault committed
5
> Check could really use some love. Any volunteers please?  
Arlo Breault's avatar
reamore    
Arlo Breault committed
6
7
8
>   --Roger
>
> https://lists.torproject.org/pipermail/tor-talk/2013-August/029306.html
Arlo Breault's avatar
Arlo Breault committed
9

Arlo Breault's avatar
reamore    
Arlo Breault committed
10
## Documentation
Arlo Breault's avatar
Arlo Breault committed
11

Arlo Breault's avatar
reamore    
Arlo Breault committed
12
See `/docs` for an idea of what's going on here.
Arlo Breault's avatar
Arlo Breault committed
13

Arlo Breault's avatar
reamore    
Arlo Breault committed
14
## Development
15

Arlo Breault's avatar
reamore    
Arlo Breault committed
16
Generating the exit list requires [stem](https://stem.torproject.org/), Tor's `python` controller library. Assuming you have a `virtualenv` ready, just:
Arlo Breault's avatar
Arlo Breault committed
17
18
19

    pip install -r requirements.txt

20
21
22
23
Alternatively,

    apt-get install python-dateutil python-stem  # stem 1.1 is in unstable

Arlo Breault's avatar
reamore    
Arlo Breault committed
24
25
For the server itself, you'll need `go` and `gettext`. Installing that might look like:

26
    apt-get install git golang gettext
Arlo Breault's avatar
reamore    
Arlo Breault committed
27
28
29
30
31
    go get github.com/samuel/go-gettext/gettext

Then you can run `make` and wait for `git` and `rsync` to fetch all the data and launch the server.

Please run the tests before sending a pull request:
32
33
34

    make test

Arlo Breault's avatar
reamore    
Arlo Breault committed
35
36
37
38
39
40
41
42
43
44
45
46
## Production

The data that `make start` pulls in will quickly become stale. What you want to do is run a `tor` instance with the following configurations in your `torrc`:

    FetchDirInfoEarly 1
    FetchDirInfoExtraEarly 1
    FetchUselessDescriptors 1
    UseMicrodescriptors 0
    DownloadExtraInfo 1

Then setup a cron job to run a script like `scripts/cpexits.sh` every hour. Setting up TorDNSEL to get the exit addresses is beyond the scope of this readme.

Arlo Breault's avatar
Arlo Breault committed
47

48
49
50
51
52
## Setup

Assuming debian, install the dependencies,

    apt-get install git golang gettext python-dateutil python-stem
Arlo Breault's avatar
Arlo Breault committed
53
    go get github.com/samuel/go-gettext/gettext
54
55
56
57

The cron job and init script assume a base directory of `/opt/check`.

    git clone https://git.torproject.org/check.git /opt/check
Arlo Breault's avatar
Arlo Breault committed
58
59
60
61
    cd /opt/check
    make i18n
    make exits
    make install
62
63
64
65
66

Then you start it up,

    /etc/init.d/check start

Arlo Breault's avatar
Arlo Breault committed
67
68
69
70
71
## /exit-addresses

The production check.tpo symlinks TorDNSEL's state file, `exit-addresses`,
to its `DocumentRoot`. This is to replace what was formerly at exitlist.tpo

72
73
74
75
76
77
78
79
## Translations

Translations are maintained in [Transifex][1]. See Tor's
[translation overview][2] to get involved.

[1]: https://www.transifex.com/projects/p/torproject/resource/2-torcheck-torcheck-pot/
[2]: https://www.torproject.org/getinvolved/translation-overview.html.en

80
## Capacity planning
Arlo Breault's avatar
Arlo Breault committed
81

Arlo Breault's avatar
newline    
Arlo Breault committed
82
83
> 54.7 requests/sec - 47.0 kB/second - 879 B/request  
> 487 requests currently being processed, 63 idle workers  
Arlo Breault's avatar
quote    
Arlo Breault committed
84
> that's check right now (43 million hits over the past 9 days)
Arlo Breault's avatar
MIT    
Arlo Breault committed
85

86
## License
Arlo Breault's avatar
MIT    
Arlo Breault committed
87

Arlo Breault's avatar
reamore    
Arlo Breault committed
88
MIT