Skip to content

Commit df762d9

Browse files
committed
Merge #1293: Refactor packages: rename crate bittorrent-x-protocol to bittorrent-x-tracker-protocol
ef7e01a refactor: [#1224] rename package to bittorrent-udp-tracker-protocol (Jose Celano) 39d9706 refactor: [#1224] rename package to bittorrent-http-tracker-protocol (Jose Celano) Pull request description: Rename packages: - Rename crate `bittorrent-http-protocol` to `bittorrent-http-tracker-protocol` - Rename crate `bittorrent-udp-protocol` to `bittorrent-udp-tracker-protocol` ACKs for top commit: josecelano: ACK ef7e01a Tree-SHA512: ce316ec0c0ea74903b477c3f879f01d3355c02fe231c36bc6f02bd48a42761e75942ed25a2f5f5992e77d83c072db263b3c4b8fa727bc5aaeb7dbfe1d839112f
2 parents 991d680 + ef7e01a commit df762d9

File tree

27 files changed

+111
-111
lines changed

27 files changed

+111
-111
lines changed

.github/workflows/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ jobs:
5555
env:
5656
CARGO_REGISTRY_TOKEN: "${{ secrets.TORRUST_UPDATE_CARGO_REGISTRY_TOKEN }}"
5757
run: |
58-
cargo publish -p bittorrent-http-protocol
5958
cargo publish -p bittorrent-http-tracker-core
59+
cargo publish -p bittorrent-http-tracker-protocol
6060
cargo publish -p bittorrent-tracker-client
6161
cargo publish -p bittorrent-tracker-core
62-
cargo publish -p bittorrent-udp-protocol
6362
cargo publish -p bittorrent-udp-tracker-core
63+
cargo publish -p bittorrent-udp-tracker-protocol
6464
cargo publish -p torrust-tracker
6565
cargo publish -p torrust-tracker-api-client
6666
cargo publish -p torrust-tracker-api-core

Cargo.lock

+28-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ axum = { version = "0", features = ["macros"] }
3939
axum-client-ip = "0"
4040
axum-extra = { version = "0", features = ["query"] }
4141
axum-server = { version = "0", features = ["tls-rustls-no-provider"] }
42-
bittorrent-http-protocol = { version = "3.0.0-develop", path = "packages/http-protocol" }
42+
bittorrent-http-tracker-protocol = { version = "3.0.0-develop", path = "packages/http-protocol" }
4343
bittorrent-http-tracker-core = { version = "3.0.0-develop", path = "packages/http-tracker-core" }
4444
bittorrent-primitives = "0.1.0"
4545
bittorrent-tracker-client = { version = "3.0.0-develop", path = "packages/tracker-client" }

packages/http-protocol/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
description = "A library with the primitive types and functions for the BitTorrent HTTP tracker protocol."
33
keywords = ["api", "library", "primitives"]
4-
name = "bittorrent-http-protocol"
4+
name = "bittorrent-http-tracker-protocol"
55
readme = "README.md"
66

77
authors.workspace = true

packages/http-protocol/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A library with the primitive types and functions used by BitTorrent HTTP tracker
44

55
## Documentation
66

7-
[Crate documentation](https://docs.rs/bittorrent-http-protocol).
7+
[Crate documentation](https://docs.rs/bittorrent-http-tracker-protocol).
88

99
## License
1010

packages/http-protocol/src/percent_encoding.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use torrust_tracker_primitives::peer;
2727
///
2828
/// ```rust
2929
/// use std::str::FromStr;
30-
/// use bittorrent_http_protocol::percent_encoding::percent_decode_info_hash;
30+
/// use bittorrent_http_tracker_protocol::percent_encoding::percent_decode_info_hash;
3131
/// use bittorrent_primitives::info_hash::InfoHash;
3232
/// use torrust_tracker_primitives::peer;
3333
///
@@ -60,7 +60,7 @@ pub fn percent_decode_info_hash(raw_info_hash: &str) -> Result<InfoHash, info_ha
6060
/// use std::str::FromStr;
6161
///
6262
/// use aquatic_udp_protocol::PeerId;
63-
/// use bittorrent_http_protocol::percent_encoding::percent_decode_peer_id;
63+
/// use bittorrent_http_tracker_protocol::percent_encoding::percent_decode_peer_id;
6464
/// use bittorrent_primitives::info_hash::InfoHash;
6565
///
6666
/// let encoded_peer_id = "%2DqB00000000000000000";

packages/http-protocol/src/v1/query.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl Query {
3131
/// input `name` exists. For example:
3232
///
3333
/// ```rust
34-
/// use bittorrent_http_protocol::v1::query::Query;
34+
/// use bittorrent_http_tracker_protocol::v1::query::Query;
3535
///
3636
/// let raw_query = "param1=value1&param2=value2";
3737
///
@@ -44,7 +44,7 @@ impl Query {
4444
/// It returns only the first param value even if it has multiple values:
4545
///
4646
/// ```rust
47-
/// use bittorrent_http_protocol::v1::query::Query;
47+
/// use bittorrent_http_tracker_protocol::v1::query::Query;
4848
///
4949
/// let raw_query = "param1=value1&param1=value2";
5050
///
@@ -60,7 +60,7 @@ impl Query {
6060
/// Returns all the param values as a vector.
6161
///
6262
/// ```rust
63-
/// use bittorrent_http_protocol::v1::query::Query;
63+
/// use bittorrent_http_tracker_protocol::v1::query::Query;
6464
///
6565
/// let query = "param1=value1&param1=value2".parse::<Query>().unwrap();
6666
///
@@ -73,7 +73,7 @@ impl Query {
7373
/// Returns all the param values as a vector even if it has only one value.
7474
///
7575
/// ```rust
76-
/// use bittorrent_http_protocol::v1::query::Query;
76+
/// use bittorrent_http_tracker_protocol::v1::query::Query;
7777
///
7878
/// let query = "param1=value1".parse::<Query>().unwrap();
7979
///

packages/http-protocol/src/v1/requests/announce.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const NUMWANT: &str = "numwant";
3434
///
3535
/// ```rust
3636
/// use aquatic_udp_protocol::{NumberOfBytes, PeerId};
37-
/// use bittorrent_http_protocol::v1::requests::announce::{Announce, Compact, Event};
37+
/// use bittorrent_http_tracker_protocol::v1::requests::announce::{Announce, Compact, Event};
3838
/// use bittorrent_primitives::info_hash::InfoHash;
3939
///
4040
/// let request = Announce {

packages/http-protocol/src/v1/responses/announce.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl Into<Vec<u8>> for Compact {
132132
///
133133
/// ```rust
134134
/// use std::net::{IpAddr, Ipv4Addr};
135-
/// use bittorrent_http_protocol::v1::responses::announce::{Normal, NormalPeer};
135+
/// use bittorrent_http_tracker_protocol::v1::responses::announce::{Normal, NormalPeer};
136136
///
137137
/// let peer = NormalPeer {
138138
/// peer_id: *b"-qB00000000000000001",
@@ -184,7 +184,7 @@ impl From<&NormalPeer> for BencodeMut<'_> {
184184
///
185185
/// ```rust
186186
/// use std::net::{IpAddr, Ipv4Addr};
187-
/// use bittorrent_http_protocol::v1::responses::announce::{Compact, CompactPeer, CompactPeerData};
187+
/// use bittorrent_http_tracker_protocol::v1::responses::announce::{Compact, CompactPeer, CompactPeerData};
188188
///
189189
/// let peer = CompactPeer::V4(CompactPeerData {
190190
/// ip: Ipv4Addr::new(0x69, 0x69, 0x69, 0x69), // 105.105.105.105

packages/http-protocol/src/v1/responses/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl Error {
2727
/// Returns the bencoded representation of the `Error` struct.
2828
///
2929
/// ```rust
30-
/// use bittorrent_http_protocol::v1::responses::error::Error;
30+
/// use bittorrent_http_tracker_protocol::v1::responses::error::Error;
3131
///
3232
/// let err = Error {
3333
/// failure_reason: "error message".to_owned(),

packages/http-protocol/src/v1/responses/scrape.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use torrust_tracker_primitives::core::ScrapeData;
99
/// The `Scrape` response for the HTTP tracker.
1010
///
1111
/// ```rust
12-
/// use bittorrent_http_protocol::v1::responses::scrape::Bencoded;
12+
/// use bittorrent_http_tracker_protocol::v1::responses::scrape::Bencoded;
1313
/// use bittorrent_primitives::info_hash::InfoHash;
1414
/// use torrust_tracker_primitives::swarm_metadata::SwarmMetadata;
1515
/// use torrust_tracker_primitives::core::ScrapeData;

packages/http-protocol/src/v1/services/peer_ip_resolver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub enum PeerIpResolutionError {
6363
/// use std::net::IpAddr;
6464
/// use std::str::FromStr;
6565
///
66-
/// use bittorrent_http_protocol::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
66+
/// use bittorrent_http_tracker_protocol::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
6767
///
6868
/// let on_reverse_proxy = true;
6969
///
@@ -85,7 +85,7 @@ pub enum PeerIpResolutionError {
8585
/// use std::net::IpAddr;
8686
/// use std::str::FromStr;
8787
///
88-
/// use bittorrent_http_protocol::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
88+
/// use bittorrent_http_tracker_protocol::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
8989
///
9090
/// let on_reverse_proxy = false;
9191
///

packages/http-tracker-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ version.workspace = true
1515

1616
[dependencies]
1717
aquatic_udp_protocol = "0"
18-
bittorrent-http-protocol = { version = "3.0.0-develop", path = "../http-protocol" }
18+
bittorrent-http-tracker-protocol = { version = "3.0.0-develop", path = "../http-protocol" }
1919
bittorrent-primitives = "0.1.0"
2020
bittorrent-tracker-core = { version = "3.0.0-develop", path = "../tracker-core" }
2121
futures = "0"

packages/http-tracker-core/src/services/announce.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use std::net::IpAddr;
1111
use std::panic::Location;
1212
use std::sync::Arc;
1313

14-
use bittorrent_http_protocol::v1::requests::announce::{peer_from_request, Announce};
15-
use bittorrent_http_protocol::v1::responses;
16-
use bittorrent_http_protocol::v1::services::peer_ip_resolver::{self, ClientIpSources};
14+
use bittorrent_http_tracker_protocol::v1::requests::announce::{peer_from_request, Announce};
15+
use bittorrent_http_tracker_protocol::v1::responses;
16+
use bittorrent_http_tracker_protocol::v1::services::peer_ip_resolver::{self, ClientIpSources};
1717
use bittorrent_tracker_core::announce_handler::{AnnounceHandler, PeersWanted};
1818
use bittorrent_tracker_core::authentication::service::AuthenticationService;
1919
use bittorrent_tracker_core::authentication::{self, Key};
@@ -115,8 +115,8 @@ mod tests {
115115
use std::sync::Arc;
116116

117117
use aquatic_udp_protocol::{AnnounceEvent, NumberOfBytes, PeerId};
118-
use bittorrent_http_protocol::v1::requests::announce::Announce;
119-
use bittorrent_http_protocol::v1::services::peer_ip_resolver::ClientIpSources;
118+
use bittorrent_http_tracker_protocol::v1::requests::announce::Announce;
119+
use bittorrent_http_tracker_protocol::v1::services::peer_ip_resolver::ClientIpSources;
120120
use bittorrent_tracker_core::announce_handler::AnnounceHandler;
121121
use bittorrent_tracker_core::authentication::key::repository::in_memory::InMemoryKeyRepository;
122122
use bittorrent_tracker_core::authentication::service::AuthenticationService;

packages/http-tracker-core/src/services/scrape.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use std::net::IpAddr;
1111
use std::sync::Arc;
1212

13-
use bittorrent_http_protocol::v1::requests::scrape::Scrape;
14-
use bittorrent_http_protocol::v1::responses;
15-
use bittorrent_http_protocol::v1::services::peer_ip_resolver::{self, ClientIpSources};
13+
use bittorrent_http_tracker_protocol::v1::requests::scrape::Scrape;
14+
use bittorrent_http_tracker_protocol::v1::responses;
15+
use bittorrent_http_tracker_protocol::v1::services::peer_ip_resolver::{self, ClientIpSources};
1616
use bittorrent_primitives::info_hash::InfoHash;
1717
use bittorrent_tracker_core::authentication::service::AuthenticationService;
1818
use bittorrent_tracker_core::authentication::Key;
@@ -203,8 +203,8 @@ mod tests {
203203
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
204204
use std::sync::Arc;
205205

206-
use bittorrent_http_protocol::v1::requests::scrape::Scrape;
207-
use bittorrent_http_protocol::v1::services::peer_ip_resolver::ClientIpSources;
206+
use bittorrent_http_tracker_protocol::v1::requests::scrape::Scrape;
207+
use bittorrent_http_tracker_protocol::v1::services::peer_ip_resolver::ClientIpSources;
208208
use bittorrent_tracker_core::announce_handler::PeersWanted;
209209
use mockall::predicate::eq;
210210
use torrust_tracker_primitives::core::ScrapeData;

packages/udp-protocol/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
description = "A library with the primitive types and functions for the BitTorrent UDP tracker protocol."
33
keywords = ["bittorrent", "library", "primitives", "udp"]
4-
name = "bittorrent-udp-protocol"
4+
name = "bittorrent-udp-tracker-protocol"
55
readme = "README.md"
66

77
authors.workspace = true

packages/udp-tracker-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ version.workspace = true
1717
aquatic_udp_protocol = "0"
1818
bittorrent-primitives = "0.1.0"
1919
bittorrent-tracker-core = { version = "3.0.0-develop", path = "../tracker-core" }
20-
bittorrent-udp-protocol = { version = "3.0.0-develop", path = "../udp-protocol" }
20+
bittorrent-udp-tracker-protocol = { version = "3.0.0-develop", path = "../udp-protocol" }
2121
bloom = "0.3.2"
2222
blowfish = "0"
2323
cipher = "0"

packages/udp-tracker-core/src/services/announce.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use bittorrent_primitives::info_hash::InfoHash;
1616
use bittorrent_tracker_core::announce_handler::{AnnounceHandler, PeersWanted};
1717
use bittorrent_tracker_core::error::{AnnounceError, WhitelistError};
1818
use bittorrent_tracker_core::whitelist;
19-
use bittorrent_udp_protocol::peer_builder;
19+
use bittorrent_udp_tracker_protocol::peer_builder;
2020
use torrust_tracker_primitives::core::AnnounceData;
2121
use torrust_tracker_primitives::peer;
2222

0 commit comments

Comments
 (0)