For the complete documentation index, see llms.txt. This page is also available as Markdown.

cURL 代码示例

cURL 是最常用的代理调试工具之一,推荐开发者在正式接入前先使用 curl 测试代理是否正常。

适用于:

  • 检测代理是否生效

  • 查看出口 IP

  • 检查国家地区

  • 排查连接问题


一、HTTP 代理测试

curl -x http://us.ipwo.net:7878 -U username_custom_zone_us:password http://ipinfo.io

二、SOCKS5 代理测试

curl -x socks5://us.ipwo.net:7878 -U username_custom_zone_us:password http://ipinfo.io

三、正常返回示例

{
  "ip": "203.0.113.10",
  "city": "Los Angeles",
  "country": "US"
}

如果返回的 IP:

  • 不是本机公网 IP

  • 国家地区正确

说明代理已经生效。


四、获取当前出口 IP

返回示例:


五、测试 IP 是否轮换

连续执行:

  • IP 变化:说明为轮换 IP

  • IP 不变:说明可能为粘性会话


六、固定 Session(粘性 IP)

适用于:

示例:

相同 Session 通常会保持同一个 IP。


七、查看详细调试日志

开发者排查问题时推荐使用:

可用于排查:


八、Windows 用户注意事项

Windows CMD / PowerShell 建议:

例如:


九、推荐开发者调试流程


十、相关文章

最后更新于

这有帮助吗?