New way of getting the links
As part of #12817 (moved), a new format for getting the links has been developed. It enables to easily add and delete providers (where bundles are uploaded). The new format is as follows:
-
A folder named 'providers' should exist on GetTor basedir. Inside this directory, every file with the .links extension is considered as a valid links file, containing links of a specific provider (e.g. dropbox.links).
-
Links files follow Python's ConfigParser format (RFC 822). All links files must have the following sections and options:
SECTION provider, OPTION name: string specifying the name of the provider (i.e. "Dropbox").
SECTION key, OPTION fingerprint: the fingerprint of the key that signed the uploaded bundles.
SECTION os, OPTION locale: link for the bundle, bundle asc, and sha256 of the file for a given operating system and locale. For example:
[linux]
en = https://abcd.ly https://efgh.ly 98ea6e4f216f2fb4b6....
en = https://ijkl.ly https://mnop.ly 44842c38686ca685f3....
-
Mirrors are considered as just another provider.
-
Every provider should have a script that automates the upload of bundles and create the proper links file. The core module provide the public create_links_file() and add_link() methods for that purpose (see core documentation for more details).
-
Each provider's script must take care of calculating the sha256 of each bundle and provide the fingerprint of the key that signed the bundles.
-
After creating the links file, the only thing the core module cares about is reading files with the extension .links inside 'providers' directory. The core assumes each .links file is well formatted.
For now Dropbox is the only supported provider. Google Drive and Github should be implemented in the future as well.