3 unstable releases
Uses new Rust 2024
| 0.2.1 | Jul 15, 2025 |
|---|---|
| 0.2.0 | Jul 9, 2025 |
| 0.1.0 | Jul 25, 2024 |
#6 in #public-ip
203 downloads per month
Used in 5 crates
(via tycho-util)
13KB
299 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
~20–35MB
~486K SLoC