mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
add blocklist config option
This commit is contained in:
parent
a97afa0434
commit
b0b7938471
2 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,10 @@ pub struct Config {
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub infohash: Vec<String>,
|
pub infohash: Vec<String>,
|
||||||
|
|
||||||
|
/// Remote address or local path
|
||||||
|
#[arg(long)]
|
||||||
|
pub blocklist: Option<Url>,
|
||||||
|
|
||||||
/// Define custom tracker(s) to preload the `.torrent` files info
|
/// Define custom tracker(s) to preload the `.torrent` files info
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub tracker: Vec<Url>,
|
pub tracker: Vec<Url>,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ async fn main() -> Result<()> {
|
||||||
preload.root().clone(),
|
preload.root().clone(),
|
||||||
SessionOptions {
|
SessionOptions {
|
||||||
bind_device_name: config.bind,
|
bind_device_name: config.bind,
|
||||||
|
blocklist_url: config.blocklist.map(|b| b.into()),
|
||||||
listen: match config.listen {
|
listen: match config.listen {
|
||||||
Some(listen_addr) => Some(ListenerOptions {
|
Some(listen_addr) => Some(ListenerOptions {
|
||||||
enable_upnp_port_forwarding: config.listen_upnp,
|
enable_upnp_port_forwarding: config.listen_upnp,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue