deps: upgrade dependencies

This commit is contained in:
椰子 2023-11-09 00:06:53 +08:00
parent e8f4acf57b
commit 655bd6110f
3 changed files with 6 additions and 1186 deletions

1176
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,8 @@
name = "cn_cidr"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
license = "MIT"
[dependencies]
reqwest = "0.10"
futures = "0.3.29"
tokio = "0.2.25"
reqwest = "0.11.22"
tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread", "rt"] }

View File

@ -1,13 +1,11 @@
use std::error::Error;
use std::fs::File;
use std::io::Write;
use tokio::runtime::Runtime;
use reqwest;
fn main() {
Runtime::new().unwrap()
.block_on(create())
.unwrap();
#[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!("3. Load new CIDR list: {}", "/import chn_list.rsc")