This commit is contained in:
parent
ea9ab77439
commit
5c9b63f181
@ -7,9 +7,10 @@ use reqwest;
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
create().await.unwrap();
|
||||
println!("1. Disable mangle rule: {}", ":foreach i in=[/ip firewall mangle find comment=\"breakwall\"] do={ /ip firewall mangle disable $i }");
|
||||
println!("2. Remove old CIDR list: {}", ":foreach i in=[ find list=$address_list ] do={ remove number=$i }");
|
||||
println!("1. Disable mangle rules: {}", ":foreach i in=[/ip firewall mangle find comment=\"breakwall\"] do={ /ip firewall mangle disable $i }");
|
||||
println!("2. Remove old CIDR list: {}", ":foreach i in=[/ip firewall address_list find list=chn_list ] do={/ip firewall address_list remove number=$i }");
|
||||
println!("3. Load new CIDR list: {}", "/import chn_list.rsc")
|
||||
println!("4. Enable mangle rules: {}", ":foreach i in=[/ip firewall mangle find comment=\"breakwall\"] do={ /ip firewall mangle enable $i }")
|
||||
}
|
||||
|
||||
async fn create() -> Result<(), Box<dyn Error>> {
|
||||
@ -45,4 +46,4 @@ fn write_to_file(file: &mut File, list: &str, address_list: &Vec<&str>) {
|
||||
let line = format!("/ip/firewall/address-list add list={} address={}\n", list, x);
|
||||
file.write(line.as_bytes()).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user