1 unstable release

0.1.0 Jul 25, 2024

#8 in #public-ip

Download history 80/week @ 2024-07-19 70/week @ 2024-07-26 30/week @ 2024-08-02 9/week @ 2024-08-09 7/week @ 2024-08-16 26/week @ 2024-08-23 27/week @ 2024-08-30 11/week @ 2024-09-06 29/week @ 2024-09-13 13/week @ 2024-09-20 3/week @ 2024-09-27

61 downloads per month

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

~7–17MB
~215K SLoC