File tree 10 files changed +18
-25
lines changed
10 files changed +18
-25
lines changed Original file line number Diff line number Diff line change 3
3
//! This module contains the configuration data structures for the
4
4
//! Torrust Tracker, which is a `BitTorrent` tracker server.
5
5
//!
6
- //! The current version for configuration is [`v2 `].
6
+ //! The current version for configuration is [`v2_0_0 `].
7
7
pub mod v2_0_0;
8
8
pub mod validator;
9
9
Original file line number Diff line number Diff line change 39
39
//! Please refer to the documentation of each structure for more information
40
40
//! about each section.
41
41
//!
42
- //! - [`Core configuration`](crate::v2 ::Configuration)
43
- //! - [`HTTP API configuration`](crate::v2 ::tracker_api::HttpApi)
44
- //! - [`HTTP Tracker configuration`](crate::v2 ::http_tracker::HttpTracker)
45
- //! - [`UDP Tracker configuration`](crate::v2 ::udp_tracker::UdpTracker)
46
- //! - [`Health Check API configuration`](crate::v2 ::health_check_api::HealthCheckApi)
42
+ //! - [`Core configuration`](crate::v2_0_0 ::Configuration)
43
+ //! - [`HTTP API configuration`](crate::v2_0_0 ::tracker_api::HttpApi)
44
+ //! - [`HTTP Tracker configuration`](crate::v2_0_0 ::http_tracker::HttpTracker)
45
+ //! - [`UDP Tracker configuration`](crate::v2_0_0 ::udp_tracker::UdpTracker)
46
+ //! - [`Health Check API configuration`](crate::v2_0_0 ::health_check_api::HealthCheckApi)
47
47
//!
48
48
//! ## Port binding
49
49
//!
78
78
//!
79
79
//! Alternatively, you could setup a reverse proxy like Nginx or Apache to
80
80
//! handle the SSL/TLS part and forward the requests to the tracker. If you do
81
- //! that, you should set [`on_reverse_proxy`](crate::v2 ::network::Network::on_reverse_proxy)
81
+ //! that, you should set [`on_reverse_proxy`](crate::v2_0_0 ::network::Network::on_reverse_proxy)
82
82
//! to `true` in the configuration file. It's out of scope for this
83
83
//! documentation to explain in detail how to setup a reverse proxy, but the
84
84
//! configuration file should be something like this:
Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ impl fmt::Display for Event {
185
185
/// Depending on the value of this param, the tracker will return a different
186
186
/// response:
187
187
///
188
- /// - [`Normal`](crate::servers::http:: v1::responses::announce::Normal), i.e. a `non-compact` response.
189
- /// - [`Compact`](crate::servers::http:: v1::responses::announce::Compact) response.
188
+ /// - [`Normal`](crate::v1::responses::announce::Normal), i.e. a `non-compact` response.
189
+ /// - [`Compact`](crate::v1::responses::announce::Compact) response.
190
190
///
191
191
/// Refer to [BEP 23. Tracker Returns Compact Peer Lists](https://www.bittorrent.org/beps/bep_0023.html)
192
192
#[ derive( PartialEq , Debug ) ]
Original file line number Diff line number Diff line change 1
1
//! HTTP requests for the HTTP tracker.
2
- //!
3
- //! Refer to the generic [HTTP server documentation](crate::servers::http) for
4
- //! more information about the HTTP tracker.
5
2
pub mod announce;
6
3
pub mod scrape;
Original file line number Diff line number Diff line change 1
- //! `Announce` response for the HTTP tracker [`announce`](bittorrent_http_protocol ::v1::requests::announce::Announce) request.
1
+ //! `Announce` response for the HTTP tracker [`announce`](crate ::v1::requests::announce::Announce) request.
2
2
//!
3
3
//! Data structures and logic to build the `announce` response.
4
4
use std:: io:: Write ;
Original file line number Diff line number Diff line change 1
- //! `Error` response for the [` HTTP tracker`](crate::servers::http) .
1
+ //! `Error` response for the HTTP tracker.
2
2
//!
3
3
//! Data structures and logic to build the error responses.
4
4
//!
@@ -15,7 +15,7 @@ use serde::Serialize;
15
15
16
16
use crate :: v1:: services:: peer_ip_resolver:: PeerIpResolutionError ;
17
17
18
- /// `Error` response for the [` HTTP tracker`](crate::servers::http) .
18
+ /// `Error` response for the HTTP tracker.
19
19
#[ derive( Serialize , Debug , PartialEq ) ]
20
20
pub struct Error {
21
21
/// Human readable string which explains why the request failed.
Original file line number Diff line number Diff line change 1
1
//! HTTP responses for the HTTP tracker.
2
- //!
3
- //! Refer to the generic [HTTP server documentation](crate::servers::http) for
4
- //! more information about the HTTP tracker.
5
2
pub mod announce;
6
3
pub mod error;
7
4
pub mod scrape;
Original file line number Diff line number Diff line change 1
- //! `Scrape` response for the HTTP tracker [`scrape`](bittorrent_http_protocol ::v1::requests::scrape::Scrape) request.
1
+ //! `Scrape` response for the HTTP tracker [`scrape`](crate ::v1::requests::scrape::Scrape) request.
2
2
//!
3
3
//! Data structures and logic to build the `scrape` response.
4
4
use std:: borrow:: Cow ;
Original file line number Diff line number Diff line change 52
52
//! The tracker responds to the peer with the list of other peers in the swarm so that
53
53
//! the peer can contact them to start downloading pieces of the file from them.
54
54
//!
55
- //! Once you have instantiated the `Tracker ` you can `announce` a new [`peer::Peer`] with:
55
+ //! Once you have instantiated the `AnnounceHandler ` you can `announce` a new [`peer::Peer`](torrust_tracker_primitives::peer::Peer) with:
56
56
//!
57
57
//! ```rust,no_run
58
58
//! use std::net::SocketAddr;
81
81
//! ```
82
82
//!
83
83
//! ```text
84
- //! let announce_data = tracker .announce(&info_hash, &mut peer, &peer_ip).await;
84
+ //! let announce_data = announce_handler .announce(&info_hash, &mut peer, &peer_ip).await;
85
85
//! ```
86
86
//!
87
87
//! The `Tracker` returns the list of peers for the torrent with the infohash `3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0`,
306
306
//! `c1277613db1d28709b034a017ab2cae4be07ae10` is the torrent infohash and `completed` contains the number of peers
307
307
//! that have a full version of the torrent data, also known as seeders.
308
308
//!
309
- //! Refer to [`peer`] module for more information about peers.
309
+ //! Refer to [`peer`](torrust_tracker_primitives::peer) for more information about peers.
310
310
//!
311
311
//! # Configuration
312
312
//!
Original file line number Diff line number Diff line change 2
2
//!
3
3
//! The service is responsible for handling the `announce` requests.
4
4
//!
5
- //! It delegates the `announce` logic to the [`Tracker`](crate::core::Tracker::announce)
6
- //! and it returns the [`AnnounceData`] returned
7
- //! by the [`Tracker`].
5
+ //! It delegates the `announce` logic to the [`AnnounceHandler`] and it returns
6
+ //! the [`AnnounceData`].
8
7
//!
9
8
//! It also sends an [`statistics::event::Event`]
10
9
//! because events are specific for the HTTP tracker.
You can’t perform that action at this time.
0 commit comments