forked from torrust/torrust-tracker
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge torrust#655: UDP Tracker Client: add
scrape
request
f4e9bda feat: [torrust#654] UDP tracker client: scrape (Jose Celano) 1b34d93 refactor: [torrust#654] UDP tracker client: use clap and anyhow (Jose Celano) Pull request description: Command: ```console $ cargo run --bin udp_tracker_client scrape udp://localhost:6969/scrape 9c38422213e30bff212b30c360d26f9a02136422 | jq Finished dev [optimized + debuginfo] target(s) in 0.07s Running `target/debug/udp_tracker_client scrape 'udp://localhost:6969/scrape' 9c38422213e30bff212b30c360d26f9a02136422` ``` Output: ```json { "torrent_stats": [ { "completed": 0, "leechers": 0, "seeders": 0 } ], "transaction_id": -888840697 } ``` ### Subtasks - [x] Print JSON instead of debug struct. - [x] Use `anyhow` and `clap`. See [HTTP Tracker client](https://github.com/torrust/torrust-tracker/blob/develop/src/bin/http_tracker_client.rs). - [x] `scrape` command. - [x] Allow using a domain. Currently, it only allows using an IP. ACKs for top commit: josecelano: ACK f4e9bda Tree-SHA512: b3fef279d1d258af67023637de1e50741ff301aeb6b87707304b35b5a6995e8244d03e169bfa5e3923ed7d2a5371cd5d8dcc8f74294e7dca1951676eca8ff5eb
- Loading branch information
Showing
2 changed files
with
249 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"words": [ | ||
"Addrs", | ||
"adduser", | ||
"alekitto", | ||
"appuser", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters