get-public-ip 接口
新增于 V2.5
对指定网络发起一次公网 IP 地址检测,检测结果缓存于设备端,可通过 get-status 读取。
请求方式
GET http://ip/usapi?method=get-public-ip&net=eth
| 参数 | 说明 |
|---|---|
| method | 方法名称:get-public-ip |
| net | 网络类型 eth: 有线网络 wifi: 无线网络 |
返回数据
{
"result": 0,
"net": "eth",
"iface": "eth0"
}
| 属性 | 说明 |
|---|---|
| result | 返回状态,0:操作成功,返回其它值请参考 API 状态码 |
| net | 网络类型 |
| iface | 出网接口名称 |