mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
rename argument from initial_peers to initial_peer
This commit is contained in:
parent
491f7ef3c4
commit
525a487806
3 changed files with 4 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ aquatic-crawler --infohash-source /path/to/info-hash-ipv4.json\
|
||||||
--torrent-tracker <TORRENT_TRACKER>
|
--torrent-tracker <TORRENT_TRACKER>
|
||||||
Define custom tracker(s) to preload the `.torrent` files info
|
Define custom tracker(s) to preload the `.torrent` files info
|
||||||
|
|
||||||
--initial-peers <INITIAL_PEERS>
|
--initial-peer <INITIAL_PEER>
|
||||||
Define initial peer(s) to preload the `.torrent` files info
|
Define initial peer(s) to preload the `.torrent` files info
|
||||||
|
|
||||||
--enable-dht
|
--enable-dht
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ pub struct Argument {
|
||||||
|
|
||||||
/// Define initial peer(s) to preload the `.torrent` files info
|
/// Define initial peer(s) to preload the `.torrent` files info
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub initial_peers: Vec<String>,
|
pub initial_peer: Vec<String>,
|
||||||
|
|
||||||
/// Enable DHT resolver
|
/// Enable DHT resolver
|
||||||
#[arg(long, default_value_t = false)]
|
#[arg(long, default_value_t = false)]
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ async fn main() -> anyhow::Result<()> {
|
||||||
trackers.insert(url::Url::from_str(&tracker)?);
|
trackers.insert(url::Url::from_str(&tracker)?);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut peers = Vec::with_capacity(argument.initial_peers.len());
|
let mut peers = Vec::with_capacity(argument.initial_peer.len());
|
||||||
for peer in argument.initial_peers {
|
for peer in argument.initial_peer {
|
||||||
peers.push(std::net::SocketAddr::from_str(&peer)?);
|
peers.push(std::net::SocketAddr::from_str(&peer)?);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue