//! For tools/winws-dry-run.sh: winws2's arguments as the service builds them, one per line. //! `zapret2_args ` use ps_core::config::Zapret2; use ps_core::zapret2::{Paths, args, keenetic}; fn main() { let a: Vec = std::env::args().collect(); let conf = std::fs::read_to_string(std::path::Path::new(&a[1]).join("keenetic").join("nfqws2.conf")).unwrap(); let (comp, state) = (&a[2], &a[3]); let source = keenetic(&conf, &format!("{comp}keenetic\\")).unwrap(); let paths = Paths { lua: format!("{comp}lua\\"), user: format!("{state}zapret-hosts-user.txt"), exclude: format!("{state}zapret-hosts-user-exclude.txt"), auto: format!("{state}learned\\zapret-hosts-auto.txt"), }; let z = Zapret2 { domains: vec!["rutracker.org".into()], ..Default::default() }; for arg in args(&z, &source, &paths, false).unwrap() { println!("{arg}"); } }