Crates.io | leicester |
lib.rs | leicester |
version | 0.0.1 |
source | src |
created_at | 2021-10-27 09:27:24.052103 |
updated_at | 2021-10-27 09:38:06.049912 |
description | A transparently hijack bindings for Rust. |
homepage | |
repository | |
max_upload_size | |
id | 472919 |
size | 25,857 |
A traffic transparently redirect bindings for Rust.
Rust bindings for tcp traffic transparently redirect, it provides a few major features:
Limitations:
A basic implementation example.
[dependencies]
leicester = { version = "0.0.1" }
Then, on your main.rs:
use leicester::{self, Config};
fn main() {
let conf = &Config {
eth_name: "ens33",
proxy_port: "17000",
redirect_port: "9080",
route_table: "133",
ignore_mask: 68,
mask: 1,
};
let hijacker = leicester::Builder::new(conf);
if hijacker.deploy().is_ok() {
println!("traffic redirect rules deploy successeful!");
} else {
println!("traffic redirect rules deploy failed!");
}
}
More examples can be found here.
This library is verified to work in rustc 1.51.0 (nightly), and the support of other versions needs more testing.
This project is licensed under the Apache License 2.0.