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
//! # Torrust-Actix
//!
//! A high-performance, feature-rich BitTorrent tracker built with [Actix Web](https://actix.rs/).
//!
//! ## Supported protocols
//!
//! - **HTTP/HTTPS** — standard BitTorrent announce and scrape ([BEP 3], [BEP 23], [BEP 48])
//! - **UDP** — UDP tracker protocol ([BEP 15], [BEP 41])
//! - **WebRTC** — browser-native peer exchange via RtcTorrent (no plugin required)
//!
//! ## Key features
//!
//! - Full IPv4 and IPv6 support ([BEP 7])
//! - SQLite 3, MySQL and PostgreSQL persistence via SQLx
//! - Whitelist, blacklist, torrent keys and per-user tracking
//! - Stand-alone / master / slave cluster mode over WebSockets
//! - Optional Redis or Memcache caching layer
//! - Cloudflare Simple Proxy Protocol support for UDP
//! - Sentry error-tracking integration
//! - Swagger UI built into the API server
//! - Configurable LZ4/Zstd in-memory compression for RtcTorrent SDP data
//!
//! [BEP 3]: https://www.bittorrent.org/beps/bep_0003.html
//! [BEP 7]: https://www.bittorrent.org/beps/bep_0007.html
//! [BEP 15]: https://www.bittorrent.org/beps/bep_0015.html
//! [BEP 23]: https://www.bittorrent.org/beps/bep_0023.html
//! [BEP 41]: https://www.bittorrent.org/beps/bep_0041.html
//! [BEP 48]: https://www.bittorrent.org/beps/bep_0048.html
/// HTTP and WebSocket API server with Swagger UI.
/// Pluggable caching layer (Redis and Memcache backends).
/// Shared utilities, error types, and compression helpers.
/// TOML-based configuration structures and environment-variable overrides.
/// Async database abstraction (SQLite 3, MySQL, PostgreSQL).
/// HTTP/HTTPS BitTorrent tracker protocol implementation.
/// IP validation, request-size limits, and other security helpers.
/// TLS certificate management and hot-reload support.
/// Atomic statistics counters for all tracker metrics.
/// Command-line argument definitions.
/// Core tracker state, peer management, and announce/scrape handling.
/// UDP BitTorrent tracker protocol implementation ([BEP 15]).
/// Miscellaneous utility functions.
/// WebSocket cluster communication (master ↔ slave).
/// Bridge between the HTTP announce endpoint and the RtcTorrent WebRTC signalling layer.