|
1 | 1 | # Torrust Tracker |
2 | | - |
3 | | - |
4 | | -## Project Description |
5 | | -Torrust Tracker is a lightweight but incredibly powerful and feature-rich BitTorrent tracker made using Rust. |
6 | | - |
7 | | - |
8 | | -### Features |
9 | | -* [X] Multiple UDP server and HTTP(S) server blocks for socket binding possible |
10 | | -* [X] Full IPv4 and IPv6 support for both UDP and HTTP(S) |
11 | | -* [X] Private & Whitelisted mode |
12 | | -* [X] Built-in API |
13 | | -* [X] Torrent whitelisting |
14 | | -* [X] Peer authentication using time-bound keys |
15 | | -* [X] newTrackon check supported for both HTTP, UDP, where IPv4 and IPv6 is properly handled |
16 | | -* [X] SQLite3 Persistent loading and saving of the torrent hashes and completed count |
17 | | -* [X] MySQL support added as engine option |
18 | | -* [X] Periodically saving added, interval can be configured |
19 | | - |
20 | | -### Implemented BEPs |
21 | | -* [BEP 3](https://www.bittorrent.org/beps/bep_0003.html): The BitTorrent Protocol |
22 | | -* [BEP 7](https://www.bittorrent.org/beps/bep_0007.html): IPv6 Support |
23 | | -* [BEP 15](http://www.bittorrent.org/beps/bep_0015.html): UDP Tracker Protocol for BitTorrent |
24 | | -* [BEP 23](http://bittorrent.org/beps/bep_0023.html): Tracker Returns Compact Peer Lists |
25 | | -* [BEP 27](http://bittorrent.org/beps/bep_0027.html): Private Torrents |
26 | | -* [BEP 41](http://bittorrent.org/beps/bep_0041.html): UDP Tracker Protocol Extensions |
27 | | -* [BEP 48](http://bittorrent.org/beps/bep_0048.html): Tracker Protocol Extension: Scrape |
| 2 | + |
| 3 | +[](https://github.com/torrust/torrust-tracker/actions/workflows/build_release.yml) [](https://github.com/torrust/torrust-tracker/actions/workflows/test_build_release.yml) [](https://github.com/torrust/torrust-tracker/actions/workflows/publish_crate.yml) [](https://github.com/torrust/torrust-tracker/actions/workflows/publish_docker_image.yml) [](https://github.com/torrust/torrust-tracker/actions/workflows/test.yml) [](https://github.com/torrust/torrust-tracker/actions/workflows/test_docker.yml) [](https://github.com/torrust/torrust-tracker/actions/workflows/codecov.yml) |
| 4 | + |
| 5 | +Torrust Tracker is a lightweight but incredibly high-performance and feature-rich BitTorrent tracker written in [Rust](https://www.rust-lang.org/). |
| 6 | + |
| 7 | +It aims to provide a reliable and efficient solution for serving torrents to a vast number of peers while maintaining a high level of performance, robustness, extensibility, security, usability and with community-driven development. |
| 8 | + |
| 9 | +## Key Features |
| 10 | + |
| 11 | +* [X] Multiple UDP server and HTTP(S) server blocks for socket binding are possible. |
| 12 | +* [X] Full IPv4 and IPv6 support for both UDP and HTTP(S). |
| 13 | +* [X] Private & Whitelisted mode. |
| 14 | +* [X] Built-in API. |
| 15 | +* [X] Torrent whitelisting. |
| 16 | +* [X] Peer authentication using time-bound keys. |
| 17 | +* [X] [newTrackon](https://newtrackon.com/) check is supported for both HTTP and UDP, where IPv4 and IPv6 are properly handled. |
| 18 | +* [X] SQLite3 and MySQL persistence, loading and saving of the torrent hashes and downloads completed count. |
| 19 | +* [X] Comprehensive documentation. |
| 20 | +* [X] A complete suite of tests. See [code coverage](https://app.codecov.io/gh/torrust/torrust-tracker) report. |
| 21 | + |
| 22 | +## Implemented BEPs |
| 23 | + |
| 24 | +* [BEP 3](https://www.bittorrent.org/beps/bep_0003.html): The BitTorrent Protocol. |
| 25 | +* [BEP 7](https://www.bittorrent.org/beps/bep_0007.html): IPv6 Support. |
| 26 | +* [BEP 15](http://www.bittorrent.org/beps/bep_0015.html): UDP Tracker Protocol for BitTorrent. |
| 27 | +* [BEP 23](http://bittorrent.org/beps/bep_0023.html): Tracker Returns Compact Peer Lists. |
| 28 | +* [BEP 27](http://bittorrent.org/beps/bep_0027.html): Private Torrents. |
| 29 | +* [BEP 48](http://bittorrent.org/beps/bep_0048.html): Tracker Protocol Extension: Scrape. |
28 | 30 |
|
29 | 31 | ## Getting Started |
30 | | -You can get the latest binaries from [releases](https://github.com/torrust/torrust-tracker/releases) or follow the install from scratch instructions below. |
31 | 32 |
|
32 | | -### Install From Scratch |
33 | | -1. Clone the repo. |
34 | | -```bash |
35 | | -git clone https://github.com/torrust/torrust-tracker.git |
36 | | -cd torrust-tracker |
37 | | -``` |
| 33 | +Requirements: |
38 | 34 |
|
39 | | -2. Build the source code. |
40 | | -```bash |
41 | | -cargo build --release |
42 | | -``` |
| 35 | +* Rust Stable `1.68` |
| 36 | +* You might have problems compiling with a machine or docker container with low resources. It has been tested with docker containers with 6 CPUs, 7.5 GM of memory and 2GB of swap. |
| 37 | + |
| 38 | +You can follow the [documentation](https://docs.rs/torrust-tracker/) to install and use Torrust Tracker in different ways, but if you want to give it a quick try, you can use the following commands: |
43 | 39 |
|
44 | | -### Usage |
45 | | -* Run the torrust-tracker once to create the `config.toml` file: |
46 | | -```bash |
47 | | -./target/release/torrust-tracker |
| 40 | +```s |
| 41 | +git clone https://github.com/torrust/torrust-tracker.git \ |
| 42 | + && cd torrust-tracker \ |
| 43 | + && cargo build --release \ |
| 44 | + && mkdir -p ./storage/database \ |
| 45 | + && mkdir -p ./storage/ssl_certificates |
48 | 46 | ``` |
49 | 47 |
|
| 48 | +And then run `cargo run` twice. The first time to generate the `config.toml` file and the second time to run the tracker with the default configuration. |
50 | 49 |
|
51 | | -* Edit the newly created config.toml file according to your liking, see [configuration documentation](https://torrust.github.io/torrust-documentation/torrust-tracker/config/). Eg: |
52 | | -```toml |
53 | | -log_level = "info" |
54 | | -mode = "public" |
55 | | -db_driver = "Sqlite3" |
56 | | -db_path = "data.db" |
57 | | -announce_interval = 120 |
58 | | -min_announce_interval = 120 |
59 | | -max_peer_timeout = 900 |
60 | | -on_reverse_proxy = false |
61 | | -external_ip = "0.0.0.0" |
62 | | -tracker_usage_statistics = true |
63 | | -persistent_torrent_completed_stat = false |
64 | | -inactive_peer_cleanup_interval = 600 |
65 | | -remove_peerless_torrents = true |
66 | | - |
67 | | -[[udp_trackers]] |
68 | | -enabled = false |
69 | | -bind_address = "0.0.0.0:6969" |
70 | | - |
71 | | -[[http_trackers]] |
72 | | -enabled = true |
73 | | -bind_address = "0.0.0.0:7070" |
74 | | -ssl_enabled = false |
75 | | -ssl_cert_path = "" |
76 | | -ssl_key_path = "" |
77 | | - |
78 | | -[http_api] |
79 | | -enabled = true |
80 | | -bind_address = "127.0.0.1:1212" |
81 | | - |
82 | | -[http_api.access_tokens] |
83 | | -admin = "MyAccessToken" |
84 | | -``` |
| 50 | +After running the tracker these services will be available: |
85 | 51 |
|
| 52 | +* UDP tracker: `udp://127.0.0.1:6969/announce`. |
| 53 | +* HTTP tracker: `http://127.0.0.1:6969/announce`. |
| 54 | +* API: `http://127.0.0.1:1212/api/v1/stats?token=MyAccessToken`. |
86 | 55 |
|
87 | | -* Run the torrust-tracker again: |
88 | | -```bash |
89 | | -./target/release/torrust-tracker |
90 | | -``` |
| 56 | +## Documentation |
| 57 | + |
| 58 | +* [Crate documentation](https://docs.rs/torrust-tracker/). |
| 59 | +* [API documentation](https://torrust.github.io/torrust-documentation/torrust-tracker/api/). |
| 60 | + |
| 61 | +## Contributing |
| 62 | + |
| 63 | +We welcome contributions from the community! |
| 64 | + |
| 65 | +How can you contribute? |
| 66 | + |
| 67 | +* Bug reports and feature requests. |
| 68 | +* Code contributions. You can start by looking at the issues labeled ["good first issues"](https://github.com/torrust/torrust-tracker/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). |
| 69 | +* Documentation improvements. Check the [documentation](https://docs.rs/torrust-tracker/) and [API documentation](https://torrust.github.io/torrust-documentation/torrust-tracker/api/) for typos, errors, or missing information. |
| 70 | +* Participation in the community. You can help by answering questions in the [discussions](https://github.com/torrust/torrust-tracker/discussions). |
| 71 | + |
| 72 | +## License |
| 73 | + |
| 74 | +The project is licensed under the terms of the [GNU AFFERO GENERAL PUBLIC LICENSE](./LICENSE). |
91 | 75 |
|
92 | | -### Tracker URL |
93 | | -Your tracker announce URL will be **udp://{tracker-ip:port}** and/or **http://{tracker-ip:port}/announce** and/or **https://{tracker-ip:port}/announce** depending on your bindings. |
94 | | -In private & private_listed mode, tracker keys are added after the tracker URL like: **https://{tracker-ip:port}/announce/{key}**. |
| 76 | +There is an ongoing discussion about the license of the project. You can follow the discussion [here](https://github.com/torrust/torrust-tracker/pull/251). |
95 | 77 |
|
96 | | -### Built-in API |
97 | | -Read the API documentation [here](https://torrust.github.io/torrust-documentation/torrust-tracker/api/). |
| 78 | +## Acknowledgments |
98 | 79 |
|
99 | | -### Credits |
100 | | -This project was a joint effort by [Nautilus Cyberneering GmbH](https://nautilus-cyberneering.de/) and [Dutch Bits](https://dutchbits.nl). |
101 | | -Also thanks to [Naim A.](https://github.com/naim94a/udpt) and [greatest-ape](https://github.com/greatest-ape/aquatic) for some parts of the code. |
102 | | -Further added features and functions thanks to [Power2All](https://github.com/power2all). |
| 80 | +This project was a joint effort by [Nautilus Cyberneering GmbH](https://nautilus-cyberneering.de/) and [Dutch Bits](https://dutchbits.nl). Also thanks to [Naim A.](https://github.com/naim94a/udpt) and [greatest-ape](https://github.com/greatest-ape/aquatic) for some parts of the code. Further added features and functions thanks to [Power2All](https://github.com/power2all). |
0 commit comments