2014-11-05 21:25:07 -03:00
|
|
|
GetTor Revamp
|
|
|
|
=============
|
2014-05-15 23:04:33 -07:00
|
|
|
|
2014-11-05 21:25:07 -03:00
|
|
|
GetTor Revamp done during the Google Summer of Code 2014 for the Tor Project.
|
|
|
|
This repository continues to being used for improvements and further
|
|
|
|
development.
|
|
|
|
|
|
|
|
What is GetTor?
|
|
|
|
===============
|
|
|
|
|
|
|
|
GetTor was created as a program for serving Tor and related files over SMTP,
|
2014-11-05 21:30:44 -03:00
|
|
|
thus avoiding direct and indirect _censorship_ of Tor's software, in particular,
|
2014-11-05 21:25:07 -03:00
|
|
|
the Tor Browser Bundle (TBB). Users interacted with GetTor by sending emails
|
|
|
|
to a specific email address. After the user specified his OS and language,
|
|
|
|
GetTor would send him an email with an attachment containing the requested
|
|
|
|
package. This worked well for a while, but the bundles started to get too
|
|
|
|
large for being sent as attachments in most email providers. In order to fix
|
|
|
|
this, GetTor started to send (Dropbox) links instead of attachments.
|
|
|
|
|
|
|
|
What are the goals of the new GetTor?
|
|
|
|
=====================================
|
|
|
|
|
|
|
|
Here is a list of the main goals the new GetTor should accomplish:
|
|
|
|
|
2014-11-05 21:30:44 -03:00
|
|
|
* Safe. Remember we are serving people under _heavy censorship_.
|
2014-11-05 21:25:07 -03:00
|
|
|
* Easy to use. The fewer user interactions, the better.
|
|
|
|
* Clean code. It should be clear to other developers/contributors how GetTor
|
2014-11-05 21:30:44 -03:00
|
|
|
works and how it can be improved.
|
2014-11-05 21:25:07 -03:00
|
|
|
* Automated. We should try to automate things as much as possible.
|
|
|
|
* Language and provider friendly. It should be easy to support new languages
|
|
|
|
and to add new providers for storing packages and generate links.
|
|
|
|
|
2019-03-01 13:49:48 +01:00
|
|
|
Installing GetTor
|
|
|
|
=================
|
2014-11-05 21:30:44 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
To install gettor locally please install the following packages (on debian):
|
2014-11-05 21:30:44 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
python3-coverage
|
|
|
|
python3-dkim
|
|
|
|
python3-dns
|
|
|
|
python3-internetarchive
|
|
|
|
python3-openssl
|
|
|
|
python3-pytest
|
|
|
|
python3-requests-oauthlib
|
|
|
|
python3-service-identity
|
|
|
|
python3-twisted
|
|
|
|
sqlite3
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
The following packages are needed to run a gettor instance:
|
2014-11-05 21:30:44 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
internetarchive
|
|
|
|
jq
|
|
|
|
rclone
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
Specifically:
|
|
|
|
internetarchive is needed to send Tor Browser files via command line to the internet archive.
|
|
|
|
jq is a json parser that is used to find out about the new tor browser releases.
|
|
|
|
Both internetarchive and jq are used in: scripts/update_files
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
The following packages are instead needed to deploy gettor via ansible:
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
ansible
|
|
|
|
ansible-lint
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
Gettor ansible playbooks live at: https://gitweb.torproject.org/admin/services/gettor.git/
|
2014-11-05 21:30:44 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
Finally the following package is used store Tor Browser files via git and support large files:
|
|
|
|
git-lfs
|
2014-11-05 21:25:07 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
Once gettor is installed you can run it with:
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
```
|
|
|
|
$ ./bin/gettor_service start
|
|
|
|
```
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
Running tests
|
|
|
|
=================
|
2014-11-05 21:25:07 -03:00
|
|
|
|
2020-01-20 20:02:53 -05:00
|
|
|
GetTor includes PyTest unit tests. To run the tests, first install the dependencies above and then run:
|
2014-11-05 21:25:07 -03:00
|
|
|
|
|
|
|
|
2019-10-31 15:48:05 +01:00
|
|
|
```
|
2020-02-07 19:09:47 -05:00
|
|
|
$ python3 scripts/create_db -n -c -o -f tests/gettor.db
|
|
|
|
$ python3 scripts/add_links_to_db -f tests/gettor.db
|
2019-10-31 15:48:05 +01:00
|
|
|
$ pytest-3 tests/
|
|
|
|
```
|