Skip to content

A lightweight Rust library to reliably find the local IP address using a connectionless UDP approach.

License

Notifications You must be signed in to change notification settings

tarunregmi/localip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

localip

A lightweight Rust library for discovering the local IP address of your machine. It uses a simple, connectionless UDP-based approach to reliably determine the local IP address without requiring internet connectivity or third-party dependencies.

Installation

Run this command in your terminal:

cargo add localip

Example:

use localip::get_local_ip;

fn main() {
    match get_local_ip() {
        Ok(ip) => println!("Local IP address: {}", ip),
        Err(e) => eprintln!("Error: {}", e),
    }
}

About

A lightweight Rust library to reliably find the local IP address using a connectionless UDP approach.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages