#ip-address #local #ip #address #web #networking

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

#107 in #address

Download history 60/week @ 2024-03-16 107/week @ 2024-03-23 120/week @ 2024-03-30 61/week @ 2024-04-06 72/week @ 2024-04-13 64/week @ 2024-04-20 63/week @ 2024-04-27 54/week @ 2024-05-04 59/week @ 2024-05-11 68/week @ 2024-05-18 53/week @ 2024-05-25 58/week @ 2024-06-01 42/week @ 2024-06-08 53/week @ 2024-06-15 69/week @ 2024-06-22 14/week @ 2024-06-29

191 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

~360–600KB