#local #ip #address #web #network

bin+lib local-ip-addr

A simple library for getting the local IP address of the current host

2 releases

0.1.1 Jan 30, 2023
0.1.0 Jan 30, 2023

#8 in #ip-address

Download history 217/week @ 2023-05-31 120/week @ 2023-06-07 182/week @ 2023-06-14 191/week @ 2023-06-21 184/week @ 2023-06-28 275/week @ 2023-07-05 163/week @ 2023-07-12 246/week @ 2023-07-19 158/week @ 2023-07-26 103/week @ 2023-08-02 90/week @ 2023-08-09 141/week @ 2023-08-16 67/week @ 2023-08-23 91/week @ 2023-08-30 157/week @ 2023-09-06 107/week @ 2023-09-13

433 downloads per month
Used in 14 crates (4 directly)

MIT license

7KB

local-ip-addr

License: MIT

A simple library for getting the local IP address of the current host.

Usage

Add this to your Cargo.toml:

[dependencies]
local-ip-addr = "0.1"

Example

use local_ip_addr::get_local_ip_address;

fn main() {
    let ip_addr = get_local_ip_address().unwrap();
    println!("Local IP address: {}", ip_addr);
}

Dependencies

~310–530KB