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

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

#89 in #network

Download history 52/week @ 2024-07-21 60/week @ 2024-07-28 47/week @ 2024-08-04 71/week @ 2024-08-11 59/week @ 2024-08-18 81/week @ 2024-08-25 46/week @ 2024-09-01 51/week @ 2024-09-08 46/week @ 2024-09-15 71/week @ 2024-09-22 59/week @ 2024-09-29 9/week @ 2024-10-06 48/week @ 2024-10-13 58/week @ 2024-10-20 46/week @ 2024-10-27 30/week @ 2024-11-03

183 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

~365–610KB