#ip-address #local #networking #panic #udp-socket #machine

bin+lib local_ipaddress

Get your local IP address without panic

4 releases

0.1.3 Sep 2, 2019
0.1.2 Sep 2, 2019
0.1.1 Sep 2, 2019
0.1.0 Sep 2, 2019

#21 in #udp-socket

Download history 1349/week @ 2023-11-20 1043/week @ 2023-11-27 1116/week @ 2023-12-04 1157/week @ 2023-12-11 946/week @ 2023-12-18 476/week @ 2023-12-25 649/week @ 2024-01-01 994/week @ 2024-01-08 1006/week @ 2024-01-15 974/week @ 2024-01-22 1074/week @ 2024-01-29 1128/week @ 2024-02-05 1311/week @ 2024-02-12 1341/week @ 2024-02-19 1622/week @ 2024-02-26 1477/week @ 2024-03-04

5,797 downloads per month
Used in 40 crates (19 directly)

MIT license

3KB

local_ipaddress

Get your local ip address in Rust, using UdpSocket to get local ip address(not network interface or ifconfig), and won't panic.

API Docs: https://docs.rs/local_ipaddress

Usage

Add this to your Cargo.toml:

[dependencies]
local_ipaddress = "0.1.3"

Getting Started

use local_ipaddress;

fn main() {
    println!("{}", local_ipaddress::get().unwrap());
}

It works fine with both Windows and Linux.

License

MIT


lib.rs:

A crate for get local ip address, without using ifconfig or scanning network interface

No runtime deps