| Crates.io | getip |
| lib.rs | getip |
| version | 0.2.1 |
| created_at | 2024-07-25 14:08:38.561495+00 |
| updated_at | 2025-07-15 16:27:25.65692+00 |
| description | Find the public IP address of a device |
| homepage | https://github.com/rexagon/getip |
| repository | https://github.com/rexagon/getip |
| max_upload_size | |
| id | 1315067 |
| size | 39,053 |
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
#[tokio::main]
async fn main() {
match getip::addr().await {
Ok(addr) => println!("My address is: {addr:?}"),
Err(e) => println!("Failed to resolve: {e:?}"),
}
}