3个版本
0.1.2 | 2023年9月30日 |
---|---|
0.1.1 | 2023年9月27日 |
0.1.0 | 2023年9月27日 |
#3 in #ipify
4KB
ipfy_public_ip
一个提供find_ip
函数的微型crate,该函数将返回请求的公网IP。
文档
这是一个简单易用的微型包。API文档在这里:https://docs.rs/ipfy_public_ip。
安装
在Cargo.toml
[dependencies]
ipfy-public-ip = "0.1.1"
并在您的crate根目录下
use ipfy_public_ip;
示例
use ipfy_public_ip;
let res = ipfy_public_ip::find_ip();
println!("{}", res);
lib.rs
:
ipfy-public-ip
ipfy-public-ip
通过IPIFY提供公网IP。
示例
let response = ipfy-public-ip::find_ip();
println!("", response)
print results 83.83.83.83
依赖关系
~5–18MB
~254K SLoC