mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
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:
co-authored by
Claude Opus 4.8
parent
4e975598f9
commit
08ee4fc0ea
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user