diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index e30eccc71..59913d476 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -55,11 +55,13 @@ jobs: env: CARGO_REGISTRY_TOKEN: "${{ secrets.TORRUST_UPDATE_CARGO_REGISTRY_TOKEN }}" run: | + cargo publish -p bittorrent-tracker-client + cargo publish -p torrust-tracker + cargo publish -p torrust-tracker-client + cargo publish -p torrust-tracker-clock + cargo publish -p torrust-tracker-configuration cargo publish -p torrust-tracker-contrib-bencode cargo publish -p torrust-tracker-located-error cargo publish -p torrust-tracker-primitives - cargo publish -p torrust-tracker-clock - cargo publish -p torrust-tracker-configuration - cargo publish -p torrust-tracker-torrent-repository cargo publish -p torrust-tracker-test-helpers - cargo publish -p torrust-tracker + cargo publish -p torrust-tracker-torrent-repository diff --git a/Cargo.lock b/Cargo.lock index 0bf1ad572..bbb012cea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -620,20 +620,15 @@ dependencies = [ name = "bittorrent-tracker-client" version = "3.0.0-develop" dependencies = [ - "anyhow", "aquatic_udp_protocol", "bittorrent-primitives", - "clap", "derive_more", - "futures", - "hex-literal", "hyper", "percent-encoding", "reqwest", "serde", "serde_bencode", "serde_bytes", - "serde_json", "serde_repr", "thiserror", "tokio", @@ -641,8 +636,6 @@ dependencies = [ "torrust-tracker-located-error", "torrust-tracker-primitives", "tracing", - "tracing-subscriber", - "url", "zerocopy", ] @@ -3899,6 +3892,31 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "torrust-tracker-client" +version = "3.0.0-develop" +dependencies = [ + "anyhow", + "aquatic_udp_protocol", + "bittorrent-primitives", + "bittorrent-tracker-client", + "clap", + "futures", + "hex-literal", + "hyper", + "reqwest", + "serde", + "serde_bencode", + "serde_bytes", + "serde_json", + "thiserror", + "tokio", + "torrust-tracker-configuration", + "tracing", + "tracing-subscriber", + "url", +] + [[package]] name = "torrust-tracker-clock" version = "3.0.0-develop" diff --git a/Cargo.toml b/Cargo.toml index a3d88be92..bc772d08a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,6 +94,7 @@ torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "packages/tes [workspace] members = [ + "console/tracker-client", "contrib/bencode", "packages/configuration", "packages/located-error", diff --git a/console/tracker-client/Cargo.toml b/console/tracker-client/Cargo.toml new file mode 100644 index 000000000..c9e951003 --- /dev/null +++ b/console/tracker-client/Cargo.toml @@ -0,0 +1,39 @@ +[package] +description = "A collection of console clients to make requests to BitTorrent trackers." +keywords = ["bittorrent", "client", "tracker"] +license = "LGPL-3.0" +name = "torrust-tracker-client" +readme = "README.md" + +authors.workspace = true +documentation.workspace = true +edition.workspace = true +homepage.workspace = true +publish.workspace = true +repository.workspace = true +rust-version.workspace = true +version.workspace = true + +[dependencies] +anyhow = "1" +aquatic_udp_protocol = "0" +bittorrent-primitives = "0.1.0" +bittorrent-tracker-client = { version = "3.0.0-develop", path = "../../packages/tracker-client" } +clap = { version = "4", features = ["derive", "env"] } +futures = "0" +hex-literal = "0" +hyper = "1" +reqwest = { version = "0", features = ["json"] } +serde = { version = "1", features = ["derive"] } +serde_bencode = "0" +serde_bytes = "0" +serde_json = { version = "1", features = ["preserve_order"] } +thiserror = "1" +tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } +torrust-tracker-configuration = { version = "3.0.0-develop", path = "../../packages/configuration" } +tracing = "0" +tracing-subscriber = { version = "0", features = ["json"] } +url = { version = "2", features = ["serde"] } + +[package.metadata.cargo-machete] +ignored = ["serde_bytes"] diff --git a/console/tracker-client/README.md b/console/tracker-client/README.md new file mode 100644 index 000000000..87722657f --- /dev/null +++ b/console/tracker-client/README.md @@ -0,0 +1,199 @@ +# Torrust Tracker Client + +A collection of console clients to make requests to BitTorrent trackers. + +> **Disclaimer**: This project is actively under development. We’re currently extracting and refining common functionality from the[Torrust Tracker](https://github.com/torrust/torrust-tracker) to make it available to the BitTorrent community in Rust. While these tools are functional, they are not yet ready for use in production or third-party projects. + +There are currently three console clients available: + +- UDP Client +- HTTP Client +- Tracker Checker + +> **Notice**: [Console apps are planned to be merge into a single tracker client in the short-term](https://github.com/torrust/torrust-tracker/discussions/660). + +## UDP Client + +`Announce` request: + +```text +cargo run --bin udp_tracker_client announce udp://127.0.0.1:6969 9c38422213e30bff212b30c360d26f9a02136422 | jq +``` + +`Announce` response: + +```json +{ + "AnnounceIpv4": { + "transaction_id": -888840697, + "announce_interval": 120, + "leechers": 0, + "seeders": 1, + "peers": [] + } +} +``` + +`Scrape` request: + +```text +cargo run --bin udp_tracker_client scrape udp://127.0.0.1:6969 9c38422213e30bff212b30c360d26f9a02136422 | jq +``` + +`Scrape` response: + +```json +{ + "Scrape": { + "transaction_id": -888840697, + "torrent_stats": [ + { + "seeders": 1, + "completed": 0, + "leechers": 0 + } + ] + } +} +``` + +## HTTP Client + +`Announce` request: + +```text +cargo run --bin http_tracker_client announce http://127.0.0.1:7070 9c38422213e30bff212b30c360d26f9a02136422 | jq +``` + +`Announce` response: + +```json +{ + "complete": 1, + "incomplete": 0, + "interval": 120, + "min interval": 120, + "peers": [] +} +``` + +`Scrape` request: + +```text + cargo run --bin http_tracker_client scrape http://127.0.0.1:7070 9c38422213e30bff212b30c360d26f9a02136422 | jq +``` + +`Scrape` response: + +```json +{ + "9c38422213e30bff212b30c360d26f9a02136422": { + "complete": 1, + "downloaded": 1, + "incomplete": 0 + } +} +``` + +## Tracker Checker + +The Tracker Checker is a tool to check the health of a list of trackers. + +```console +TORRUST_CHECKER_CONFIG='{ + "udp_trackers": ["127.0.0.1:6969"], + "http_trackers": ["http://127.0.0.1:7070"], + "health_checks": ["http://127.0.0.1:1212/api/health_check"] + }' cargo run --bin tracker_checker +``` + +Output: + +```json +[ + { + "Udp": { + "Ok": { + "remote_addr": "127.0.0.1:6969", + "results": [ + [ + "Setup", + { + "Ok": null + } + ], + [ + "Connect", + { + "Ok": null + } + ], + [ + "Announce", + { + "Ok": null + } + ], + [ + "Scrape", + { + "Ok": null + } + ] + ] + } + } + }, + { + "Health": { + "Ok": { + "url": "http://127.0.0.1:1212/api/health_check", + "result": { + "Ok": "200 OK" + } + } + } + }, + { + "Http": { + "Ok": { + "url": "http://127.0.0.1:7070/", + "results": [ + [ + "Announce", + { + "Ok": null + } + ], + [ + "Scrape", + { + "Ok": null + } + ] + ] + } + } + } +] +``` + +## License + +**Copyright (c) 2024 The Torrust Developers.** + +This program is free software: you can redistribute it and/or modify it under the terms of the [GNU Lesser General Public License][LGPL_3_0] as published by the [Free Software Foundation][FSF], version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU Lesser General Public License][LGPL_3_0] for more details. + +You should have received a copy of the *GNU Lesser General Public License* along with this program. If not, see . + +Some files include explicit copyright notices and/or license notices. + +### Legacy Exception + +For prosperity, versions of Torrust BitTorrent Tracker Client that are older than five years are automatically granted the [MIT-0][MIT_0] license in addition to the existing [LGPL-3.0-only][LGPL_3_0] license. + +[LGPL_3_0]: ./LICENSE +[MIT_0]: ./docs/licenses/LICENSE-MIT_0 +[FSF]: https://www.fsf.org/ diff --git a/console/tracker-client/docs/licenses/LICENSE-MIT_0 b/console/tracker-client/docs/licenses/LICENSE-MIT_0 new file mode 100644 index 000000000..fc06cc4fe --- /dev/null +++ b/console/tracker-client/docs/licenses/LICENSE-MIT_0 @@ -0,0 +1,14 @@ +MIT No Attribution + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/tracker-client/src/bin/http_tracker_client.rs b/console/tracker-client/src/bin/http_tracker_client.rs similarity index 67% rename from packages/tracker-client/src/bin/http_tracker_client.rs rename to console/tracker-client/src/bin/http_tracker_client.rs index 8c2c0356d..be1b4821d 100644 --- a/packages/tracker-client/src/bin/http_tracker_client.rs +++ b/console/tracker-client/src/bin/http_tracker_client.rs @@ -1,5 +1,5 @@ //! Program to make request to HTTP trackers. -use bittorrent_tracker_client::console::clients::http::app; +use torrust_tracker_client::console::clients::http::app; #[tokio::main] async fn main() -> anyhow::Result<()> { diff --git a/packages/tracker-client/src/bin/tracker_checker.rs b/console/tracker-client/src/bin/tracker_checker.rs similarity index 66% rename from packages/tracker-client/src/bin/tracker_checker.rs rename to console/tracker-client/src/bin/tracker_checker.rs index eb2a7d82c..3ff78eec1 100644 --- a/packages/tracker-client/src/bin/tracker_checker.rs +++ b/console/tracker-client/src/bin/tracker_checker.rs @@ -1,5 +1,5 @@ //! Program to check running trackers. -use bittorrent_tracker_client::console::clients::checker::app; +use torrust_tracker_client::console::clients::checker::app; #[tokio::main] async fn main() { diff --git a/packages/tracker-client/src/bin/udp_tracker_client.rs b/console/tracker-client/src/bin/udp_tracker_client.rs similarity index 67% rename from packages/tracker-client/src/bin/udp_tracker_client.rs rename to console/tracker-client/src/bin/udp_tracker_client.rs index 5f6b4f50d..caf5ab0dc 100644 --- a/packages/tracker-client/src/bin/udp_tracker_client.rs +++ b/console/tracker-client/src/bin/udp_tracker_client.rs @@ -1,5 +1,5 @@ //! Program to make request to UDP trackers. -use bittorrent_tracker_client::console::clients::udp::app; +use torrust_tracker_client::console::clients::udp::app; #[tokio::main] async fn main() -> anyhow::Result<()> { diff --git a/packages/tracker-client/src/console/clients/checker/app.rs b/console/tracker-client/src/console/clients/checker/app.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/app.rs rename to console/tracker-client/src/console/clients/checker/app.rs diff --git a/packages/tracker-client/src/console/clients/checker/checks/health.rs b/console/tracker-client/src/console/clients/checker/checks/health.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/checks/health.rs rename to console/tracker-client/src/console/clients/checker/checks/health.rs diff --git a/packages/tracker-client/src/console/clients/checker/checks/http.rs b/console/tracker-client/src/console/clients/checker/checks/http.rs similarity index 93% rename from packages/tracker-client/src/console/clients/checker/checks/http.rs rename to console/tracker-client/src/console/clients/checker/checks/http.rs index 48ce9678d..0fd37ca48 100644 --- a/packages/tracker-client/src/console/clients/checker/checks/http.rs +++ b/console/tracker-client/src/console/clients/checker/checks/http.rs @@ -2,13 +2,13 @@ use std::str::FromStr as _; use std::time::Duration; use bittorrent_primitives::info_hash::InfoHash; +use bittorrent_tracker_client::http::client::responses::announce::Announce; +use bittorrent_tracker_client::http::client::responses::scrape; +use bittorrent_tracker_client::http::client::{requests, Client}; use serde::Serialize; use url::Url; use crate::console::clients::http::Error; -use crate::http::client::responses::announce::Announce; -use crate::http::client::responses::scrape; -use crate::http::client::{requests, Client}; #[derive(Debug, Clone, Serialize)] pub struct Checks { diff --git a/packages/tracker-client/src/console/clients/checker/checks/mod.rs b/console/tracker-client/src/console/clients/checker/checks/mod.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/checks/mod.rs rename to console/tracker-client/src/console/clients/checker/checks/mod.rs diff --git a/packages/tracker-client/src/console/clients/checker/checks/structs.rs b/console/tracker-client/src/console/clients/checker/checks/structs.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/checks/structs.rs rename to console/tracker-client/src/console/clients/checker/checks/structs.rs diff --git a/packages/tracker-client/src/console/clients/checker/checks/udp.rs b/console/tracker-client/src/console/clients/checker/checks/udp.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/checks/udp.rs rename to console/tracker-client/src/console/clients/checker/checks/udp.rs diff --git a/packages/tracker-client/src/console/clients/checker/config.rs b/console/tracker-client/src/console/clients/checker/config.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/config.rs rename to console/tracker-client/src/console/clients/checker/config.rs diff --git a/packages/tracker-client/src/console/clients/checker/console.rs b/console/tracker-client/src/console/clients/checker/console.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/console.rs rename to console/tracker-client/src/console/clients/checker/console.rs diff --git a/packages/tracker-client/src/console/clients/checker/logger.rs b/console/tracker-client/src/console/clients/checker/logger.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/logger.rs rename to console/tracker-client/src/console/clients/checker/logger.rs diff --git a/packages/tracker-client/src/console/clients/checker/mod.rs b/console/tracker-client/src/console/clients/checker/mod.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/mod.rs rename to console/tracker-client/src/console/clients/checker/mod.rs diff --git a/packages/tracker-client/src/console/clients/checker/printer.rs b/console/tracker-client/src/console/clients/checker/printer.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/printer.rs rename to console/tracker-client/src/console/clients/checker/printer.rs diff --git a/packages/tracker-client/src/console/clients/checker/service.rs b/console/tracker-client/src/console/clients/checker/service.rs similarity index 100% rename from packages/tracker-client/src/console/clients/checker/service.rs rename to console/tracker-client/src/console/clients/checker/service.rs diff --git a/packages/tracker-client/src/console/clients/http/app.rs b/console/tracker-client/src/console/clients/http/app.rs similarity index 91% rename from packages/tracker-client/src/console/clients/http/app.rs rename to console/tracker-client/src/console/clients/http/app.rs index 8db6fe46d..105b18bff 100644 --- a/packages/tracker-client/src/console/clients/http/app.rs +++ b/console/tracker-client/src/console/clients/http/app.rs @@ -18,15 +18,14 @@ use std::time::Duration; use anyhow::Context; use bittorrent_primitives::info_hash::InfoHash; +use bittorrent_tracker_client::http::client::requests::announce::QueryBuilder; +use bittorrent_tracker_client::http::client::responses::announce::Announce; +use bittorrent_tracker_client::http::client::responses::scrape; +use bittorrent_tracker_client::http::client::{requests, Client}; use clap::{Parser, Subcommand}; use reqwest::Url; use torrust_tracker_configuration::DEFAULT_TIMEOUT; -use crate::http::client::requests::announce::QueryBuilder; -use crate::http::client::responses::announce::Announce; -use crate::http::client::responses::scrape; -use crate::http::client::{requests, Client}; - #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] struct Args { diff --git a/packages/tracker-client/src/console/clients/http/mod.rs b/console/tracker-client/src/console/clients/http/mod.rs similarity index 83% rename from packages/tracker-client/src/console/clients/http/mod.rs rename to console/tracker-client/src/console/clients/http/mod.rs index e4b6fbe57..917c94fa8 100644 --- a/packages/tracker-client/src/console/clients/http/mod.rs +++ b/console/tracker-client/src/console/clients/http/mod.rs @@ -1,17 +1,18 @@ use std::sync::Arc; +use bittorrent_tracker_client::http::client::responses::scrape::BencodeParseError; use serde::Serialize; use thiserror::Error; -use crate::http::client::responses::scrape::BencodeParseError; - pub mod app; #[derive(Debug, Clone, Error, Serialize)] #[serde(into = "String")] pub enum Error { #[error("Http request did not receive a response within the timeout: {err:?}")] - HttpClientError { err: crate::http::client::Error }, + HttpClientError { + err: bittorrent_tracker_client::http::client::Error, + }, #[error("Http failed to get a response at all: {err:?}")] ResponseError { err: Arc }, #[error("Failed to deserialize the bencoded response data with the error: \"{err:?}\"")] diff --git a/packages/tracker-client/src/console/clients/mod.rs b/console/tracker-client/src/console/clients/mod.rs similarity index 100% rename from packages/tracker-client/src/console/clients/mod.rs rename to console/tracker-client/src/console/clients/mod.rs diff --git a/packages/tracker-client/src/console/clients/udp/app.rs b/console/tracker-client/src/console/clients/udp/app.rs similarity index 100% rename from packages/tracker-client/src/console/clients/udp/app.rs rename to console/tracker-client/src/console/clients/udp/app.rs diff --git a/packages/tracker-client/src/console/clients/udp/checker.rs b/console/tracker-client/src/console/clients/udp/checker.rs similarity index 98% rename from packages/tracker-client/src/console/clients/udp/checker.rs rename to console/tracker-client/src/console/clients/udp/checker.rs index b9fd3a729..bf6b49782 100644 --- a/packages/tracker-client/src/console/clients/udp/checker.rs +++ b/console/tracker-client/src/console/clients/udp/checker.rs @@ -8,9 +8,9 @@ use aquatic_udp_protocol::{ PeerId, PeerKey, Port, Response, ScrapeRequest, TransactionId, }; use bittorrent_primitives::info_hash::InfoHash as TorrustInfoHash; +use bittorrent_tracker_client::udp::client::UdpTrackerClient; use super::Error; -use crate::udp::client::UdpTrackerClient; /// A UDP Tracker client to make test requests (checks). #[derive(Debug)] diff --git a/packages/tracker-client/src/console/clients/udp/mod.rs b/console/tracker-client/src/console/clients/udp/mod.rs similarity index 97% rename from packages/tracker-client/src/console/clients/udp/mod.rs rename to console/tracker-client/src/console/clients/udp/mod.rs index ae6271a78..fbfd53770 100644 --- a/packages/tracker-client/src/console/clients/udp/mod.rs +++ b/console/tracker-client/src/console/clients/udp/mod.rs @@ -1,11 +1,10 @@ use std::net::SocketAddr; use aquatic_udp_protocol::Response; +use bittorrent_tracker_client::udp; use serde::Serialize; use thiserror::Error; -use crate::udp; - pub mod app; pub mod checker; pub mod responses; diff --git a/packages/tracker-client/src/console/clients/udp/responses/dto.rs b/console/tracker-client/src/console/clients/udp/responses/dto.rs similarity index 100% rename from packages/tracker-client/src/console/clients/udp/responses/dto.rs rename to console/tracker-client/src/console/clients/udp/responses/dto.rs diff --git a/packages/tracker-client/src/console/clients/udp/responses/json.rs b/console/tracker-client/src/console/clients/udp/responses/json.rs similarity index 100% rename from packages/tracker-client/src/console/clients/udp/responses/json.rs rename to console/tracker-client/src/console/clients/udp/responses/json.rs diff --git a/packages/tracker-client/src/console/clients/udp/responses/mod.rs b/console/tracker-client/src/console/clients/udp/responses/mod.rs similarity index 100% rename from packages/tracker-client/src/console/clients/udp/responses/mod.rs rename to console/tracker-client/src/console/clients/udp/responses/mod.rs diff --git a/packages/tracker-client/src/console/mod.rs b/console/tracker-client/src/console/mod.rs similarity index 100% rename from packages/tracker-client/src/console/mod.rs rename to console/tracker-client/src/console/mod.rs diff --git a/console/tracker-client/src/lib.rs b/console/tracker-client/src/lib.rs new file mode 100644 index 000000000..5b9849fdc --- /dev/null +++ b/console/tracker-client/src/lib.rs @@ -0,0 +1 @@ +pub mod console; diff --git a/packages/tracker-client/Cargo.toml b/packages/tracker-client/Cargo.toml index 3334e7b47..52b0be639 100644 --- a/packages/tracker-client/Cargo.toml +++ b/packages/tracker-client/Cargo.toml @@ -1,5 +1,5 @@ [package] -description = "A library with the primitive types shared by the Torrust tracker packages." +description = "A library with the generic tracker clients." keywords = ["bittorrent", "client", "tracker"] license = "LGPL-3.0" name = "bittorrent-tracker-client" @@ -15,20 +15,15 @@ rust-version.workspace = true version.workspace = true [dependencies] -anyhow = "1" aquatic_udp_protocol = "0" bittorrent-primitives = "0.1.0" -clap = { version = "4", features = ["derive", "env"] } derive_more = { version = "1", features = ["as_ref", "constructor", "from"] } -futures = "0" -hex-literal = "0" hyper = "1" percent-encoding = "2" reqwest = { version = "0", features = ["json"] } serde = { version = "1", features = ["derive"] } serde_bencode = "0" serde_bytes = "0" -serde_json = { version = "1", features = ["preserve_order"] } serde_repr = "0" thiserror = "1" tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } @@ -36,8 +31,6 @@ torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configur torrust-tracker-located-error = { version = "3.0.0-develop", path = "../located-error" } torrust-tracker-primitives = { version = "3.0.0-develop", path = "../primitives" } tracing = "0" -tracing-subscriber = { version = "0", features = ["json"] } -url = { version = "2", features = ["serde"] } zerocopy = "0.7" [package.metadata.cargo-machete] diff --git a/packages/tracker-client/README.md b/packages/tracker-client/README.md index 1d12f9c86..ebd0c4bda 100644 --- a/packages/tracker-client/README.md +++ b/packages/tracker-client/README.md @@ -1,8 +1,8 @@ # BitTorrent Tracker Client -A library an console applications to interact with a BitTorrent tracker. +A library to interact with BitTorrent trackers. -> **Disclaimer**: This project is actively under development. We’re currently extracting and refining common types from the ][Torrust Tracker](https://github.com/torrust/torrust-tracker) to make them available to the BitTorrent community in Rust. While these types are functional, they are not yet ready for use in production or third-party projects. +> **Disclaimer**: This project is actively under development. We’re currently extracting and refining common types from the[Torrust Tracker](https://github.com/torrust/torrust-tracker) to make them available to the BitTorrent community in Rust. While these types are functional, they are not yet ready for use in production or third-party projects. ## License diff --git a/packages/tracker-client/src/http/url_encoding.rs b/packages/tracker-client/src/http/url_encoding.rs index ee7ab166e..6adb2e903 100644 --- a/packages/tracker-client/src/http/url_encoding.rs +++ b/packages/tracker-client/src/http/url_encoding.rs @@ -31,7 +31,7 @@ use torrust_tracker_primitives::peer; /// /// ```rust /// use std::str::FromStr; -/// use torrust_tracker::servers::http::percent_encoding::percent_decode_info_hash; +/// use bittorrent_tracker_client::http::url_encoding::percent_decode_info_hash; /// use bittorrent_primitives::info_hash::InfoHash; /// use torrust_tracker_primitives::peer; /// @@ -64,7 +64,7 @@ pub fn percent_decode_info_hash(raw_info_hash: &str) -> Result io::Result<()> { tracing::info!( - "Running Tracker Checker: TORRUST_CHECKER_CONFIG=[config] cargo run -p bittorrent-tracker-client --bin tracker_checker" + "Running Tracker Checker: TORRUST_CHECKER_CONFIG=[config] cargo run -p torrust-tracker-client --bin tracker_checker" ); tracing::info!("Tracker Checker config:\n{config_content}"); let status = Command::new("cargo") .env("TORRUST_CHECKER_CONFIG", config_content) - .args(["run", "-p", "bittorrent-tracker-client", "--bin", "tracker_checker"]) + .args(["run", "-p", "torrust-tracker-client", "--bin", "tracker_checker"]) .status()?; if status.success() {