A simple library to get your public IP address.
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Example
use get_public_ip;
async
A simple library to get your public IP address.
Add this to your Cargo.toml:
[dependencies]
public-ip-addr = "0.1"
use public_ip_addr::get_public_ip;
#[tokio::main]
async fn main() {
let ip = get_public_ip().await.unwrap();
println!("Your public IP is: {}", ip);
}