1 unstable release
0.1.0 | Jan 30, 2023 |
---|
#17 in #public-ip
Used in cargo-nebular-setup
18KB
public-ip-addr
A simple library to get your public IP address.
Usage
Add this to your Cargo.toml
:
[dependencies]
public-ip-addr = "0.1"
Example
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);
}
Dependencies
~21–35MB
~633K SLoC