Compare commits
2 Commits
8358a18de3
...
655bd6110f
Author | SHA1 | Date | |
---|---|---|---|
655bd6110f | |||
e8f4acf57b |
1176
Cargo.lock
generated
1176
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,8 @@
|
|||||||
name = "cn_cidr"
|
name = "cn_cidr"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "MIT"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
reqwest = "0.10"
|
reqwest = "0.11.22"
|
||||||
futures = "0.3.29"
|
tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread", "rt"] }
|
||||||
tokio = "0.2.25"
|
|
||||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Yezzi Hsueh
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
@ -1,13 +1,11 @@
|
|||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use tokio::runtime::Runtime;
|
|
||||||
use reqwest;
|
use reqwest;
|
||||||
|
|
||||||
fn main() {
|
#[tokio::main]
|
||||||
Runtime::new().unwrap()
|
async fn main() {
|
||||||
.block_on(create())
|
create().await.unwrap();
|
||||||
.unwrap();
|
|
||||||
println!("1. Disable mangle rule: {}", ":foreach i in=[/ip firewall mangle find comment=\"breakwall\"] do={ /ip firewall mangle disable $i }");
|
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!("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")
|
println!("3. Load new CIDR list: {}", "/import chn_list.rsc")
|
||||||
|
Loading…
Reference in New Issue
Block a user