Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"automock",
"Avicora",
"Azureus",
"bdecode",
"bencode",
"bencoded",
"beps",
Expand Down Expand Up @@ -56,6 +57,7 @@
"reannounce",
"repr",
"reqwest",
"rerequests",
"rngs",
"rusqlite",
"rustfmt",
Expand Down
24 changes: 22 additions & 2 deletions packages/configuration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,29 @@ pub struct Configuration {
pub db_driver: DatabaseDriver,
pub db_path: String,

/// Interval in seconds that the client should wait between sending regular announce requests to the tracker
/// Interval in seconds that the client should wait between sending regular
/// announce requests to the tracker.
///
/// It's a **recommended** wait time between announcements.
///
/// This is the standard amount of time that clients should wait between
/// sending consecutive announcements to the tracker. This value is set by
/// the tracker and is typically provided in the tracker's response to a
/// client's initial request. It serves as a guideline for clients to know
/// how often they should contact the tracker for updates on the peer list,
/// while ensuring that the tracker is not overwhelmed with requests.
pub announce_interval: u32,
/// Minimum announce interval. Clients must not reannounce more frequently than this
/// Minimum announce interval. Clients must not reannounce more frequently
/// than this.
///
/// It establishes the shortest allowed wait time.
///
/// This is an optional parameter in the protocol that the tracker may
/// provide in its response. It sets a lower limit on the frequency at which
/// clients are allowed to send announcements. Clients should respect this
/// value to prevent sending too many requests in a short period, which
/// could lead to excessive load on the tracker or even getting banned by
/// the tracker for not adhering to the rules.
pub min_announce_interval: u32,
pub on_reverse_proxy: bool,
pub external_ip: Option<String>,
Expand Down
19 changes: 16 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
//! - [Run with docker](#run-with-docker)
//! - [Configuration](#configuration)
//! - [Usage](#usage)
//! - [API](#api)
//! - [HTTP Tracker](#http-tracker)
//! - [UDP Tracker](#udp-tracker)
//! - [Components](#components)
//! - [Implemented BEPs](#implemented-beps)
//! - [Contributing](#contributing)
//! - [Documentation](#documentation)
//!
//! # Features
//!
Expand Down Expand Up @@ -181,7 +185,7 @@
//! - UDP tracker: <http://localhost:6969>
//! - HTTP tracker: <http://localhost:7070>
//!
//! ## API usage
//! ## API
//!
//! In order to use the tracker API you need to enable it in the configuration:
//!
Expand Down Expand Up @@ -231,7 +235,7 @@
//!
//! Refer to the [`API`](crate::servers::apis) documentation for more information about the [`API`](crate::servers::apis) endpoints.
//!
//! ## HTTP tracker usage
//! ## HTTP tracker
//!
//! The HTTP tracker implements two type of requests:
//!
Expand Down Expand Up @@ -331,7 +335,7 @@
//! You can also use the Torrust Tracker together with the [Torrust Index](https://github.com/torrust/torrust-index). If that's the case,
//! the Index will create the keys by using the tracker [API](crate::servers::apis).
//!
//! ## UDP tracker usage
//! ## UDP tracker
//!
//! The UDP tracker also implements two type of requests:
//!
Expand Down Expand Up @@ -430,6 +434,15 @@
//! # Contributing
//!
//! If you want to contribute to this documentation you can [open a new pull request](https://github.com/torrust/torrust-tracker/pulls).
//!
//! # Documentation
//!
//! You can find this documentation on [docs.rs](https://docs.rs/torrust-tracker/).
//!
//! If you want to contribute to this documentation you can [open a new pull request](https://github.com/torrust/torrust-tracker/pulls).
//!
//! In addition to the production code documentation you can find a lot of
//! examples on the integration and unit tests.
pub mod app;
pub mod bootstrap;
pub mod servers;
Expand Down
Loading