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

#37 in #udp-socket

Download history 2065/week @ 2024-07-29 1460/week @ 2024-08-05 1388/week @ 2024-08-12 1118/week @ 2024-08-19 1343/week @ 2024-08-26 873/week @ 2024-09-02 1013/week @ 2024-09-09 702/week @ 2024-09-16 1535/week @ 2024-09-23 872/week @ 2024-09-30 750/week @ 2024-10-07 1143/week @ 2024-10-14 1009/week @ 2024-10-21 894/week @ 2024-10-28 780/week @ 2024-11-04 1018/week @ 2024-11-11

3,750 downloads per month
Used in 48 crates (20 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