Crates.io | isitbad_api |
lib.rs | isitbad_api |
version | 1.0.0 |
source | src |
created_at | 2023-12-06 17:34:04.854315 |
updated_at | 2023-12-06 17:44:21.002517 |
description | A simple API wrapper for https://funkemunky.cc Kauri VPN's IsItBad API |
homepage | |
repository | |
max_upload_size | |
id | 1060283 |
size | 34,061 |
This is a Rust implementation of the IsItBad API, currently hosted on https://funkemunky.cc.
Git: https://github.com/funkemunky/AntiVPN-API-Rust/
You can provide either an IPv4 or IPv6 to check.
cargo add isitbad_api
use isitbad_api::get_ip_info;
fn main() {
let result = match get_ip_info("192.168.1.1".to_string()) {
Ok(ip_info) => ip_info,
Err(failed_response) => {
panic!("Failed to get IP information: {}", failed_response.reason);
}
};
println!("Is {} a VPN: {}", result.ip, result.proxy);
}
Cli Output:
dawson@dawsons-desktop-fedora:~/Dev/Rust/RustExampleAPI$ cargo run
Compiling rust_example_api v0.1.0 (/home/dawson/Dev/Rust/RustExampleAPI)
Finished dev [unoptimized + debuginfo] target(s) in 0.50s
Running `target/debug/rust_example_api`
Is 192.168.1.1 a VPN: true