# local_ip ![Build Status](https://github.com/adiatma/local_ip/workflows/Rust/badge.svg) ## About This library to get your computer ip using command `ifconfig` and combine with [UdpSocket](https://doc.rust-lang.org/std/net/struct.UdpSocket.html). ## Usage Please see the [example](./src/main.rs) ```rust extern crate get_local_ip; use get_local_ip::{local, network}; fn main() { // ip with port. println!("{:?}", network().unwrap().get()); // "192.168.43.134:49187" println!("{:?}", local().unwrap().get()); // "127.0.0.1:60234" // ip without port. println!("{:?}", network().unwrap().ip); // 192.168.43.134 println!("{:?}", local().unwrap().ip); // 127.0.0.1 // port without ip. println!("{:?}", network().unwrap().port); // 58096 } ``` ## Support - ⚠️ Coming soon to support for `windows` operating system. ## License MIT