Add per-scanner enable/disable configuration

Each scanner (ARP, mDNS, SSDP/UPnP, DHCP) can now be turned off via an
`enabled` flag in its config section, defaulting to true so existing
deployments are unchanged. A disabled scanner's entry function returns
early and never starts.

Documented in the README options table (also fixing the stale `timings.*`
key names to the actual `arp_scanner.*` keys), and added to the TOML
samples and the NixOS module.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-01 19:00:56 -04:00
co-authored by Claude Opus 4.8
parent 4e975598f9
commit 08ee4fc0ea
9 changed files with 160 additions and 30 deletions
+5
View File
@@ -9,6 +9,11 @@ use log::{debug, info};
use tokio::time::{Duration, sleep};
pub async fn scan() -> Result<(), Box<dyn std::error::Error>> {
if !get_settings().arp_scanner.enabled {
info!("ARP scanner disabled in configuration; not starting");
return Ok(());
}
loop {
status::set_running();