From b0b79384711c025dfd8fa8746582a0c79ae508c8 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 8 Aug 2025 20:25:26 +0300 Subject: [PATCH] add blocklist config option --- src/config.rs | 4 ++++ src/main.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/src/config.rs b/src/config.rs index 68ad4b7..0024623 100644 --- a/src/config.rs +++ b/src/config.rs @@ -12,6 +12,10 @@ pub struct Config { #[arg(long)] pub infohash: Vec, + /// Remote address or local path + #[arg(long)] + pub blocklist: Option, + /// Define custom tracker(s) to preload the `.torrent` files info #[arg(long)] pub tracker: Vec, diff --git a/src/main.rs b/src/main.rs index da89e7e..d604075 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,7 @@ async fn main() -> Result<()> { preload.root().clone(), SessionOptions { bind_device_name: config.bind, + blocklist_url: config.blocklist.map(|b| b.into()), listen: match config.listen { Some(listen_addr) => Some(ListenerOptions { enable_upnp_port_forwarding: config.listen_upnp,