Crates.io | server-security |
lib.rs | server-security |
version | 0.1.1 |
source | src |
created_at | 2021-04-21 06:32:07.303957 |
updated_at | 2021-04-21 17:51:39.599799 |
description | server security proxy |
homepage | |
repository | https://github.com/baoyachi/server-security-rs |
max_upload_size | |
id | 387478 |
size | 30,622 |
server security proxy write by Rust
[proxy]
server_addr = "0.0.0.0:8081"
to_addr = "127.0.0.1:8080"
[log]
# see how to configrution simple-log:https://github.com/baoyachi/simple-log
path = "./var/log/server_security/server_security.log"
level = "INFO"
size = 200
out_kind = ["file"]
roll_count = 300
use server_security::start;
use std::process::exit;
#[tokio::main]
async fn main() {
let args: Vec<String> = std::env::args().map(|x| format!("{}", x)).collect();
if args.len() < 2 {
println!("lost config path error");
exit(-1);
}
start(format!("{}", args[1])).await.unwrap();
}