获取 IP 信息

GET 正常运行

获取当前访问者的 IP 地址及相关信息,支持 IPv4/IPv6。

请求地址
/api/proxy/get-ip
响应示例
{
  "code": 200,
  "message": "success",
  "data": {
    "processedString": "127.0.0.1",
    "rawIspInfo": "",
    "type": "IPv4"
  }
}
调用示例
fetch('https://www.somoe.top/api/proxy/get-ip')
  .then(res => res.json())
  .then(data => console.log(data));
在线测试