1 unstable release
0.1.0 | Jul 25, 2024 |
---|
#1887 in Network programming
62 downloads per month
12KB
263 lines
getip
A small crate to find the public IP address of a device.
[!NOTE] This crate is just an updated and minified version of https://github.com/avitex/rust-public-ip
Example
#[tokio::main]
async fn main() {
match getip::addr().await {
Ok(addr) => println!("My address is: {addr:?}"),
Err(e) => println!("Failed to resolve: {e:?}"),
}
}
Dependencies
~7–16MB
~222K SLoC