1 unstable release

0.1.0 Jul 25, 2024

#14 in #public-ip

Download history 1/week @ 2024-11-16 20/week @ 2024-11-23 13/week @ 2024-11-30 7/week @ 2024-12-07 6/week @ 2024-12-14 3/week @ 2024-12-21 4/week @ 2025-02-01 4/week @ 2025-02-08 14/week @ 2025-02-15 21/week @ 2025-02-22 23/week @ 2025-03-01

63 downloads per month
Used in tycho-util

MIT license

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

~8–18MB
~227K SLoC