> For the complete documentation index, see [llms.txt](https://iptuns.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://iptuns.gitbook.io/docs/dai-li-chan-pin/jing-tai-zhu-zhai-dai-li/curl-qing-qiu.md).

# CURL请求

{% hint style="warning" %}
平台的所有代理产品均需要在海外网络环境下使用，海外网络环境需要客户自行配置。
{% endhint %}

本文展示如何使用 `curl` 通过**Iptuns**静态住宅代理IP发起请求，适用于终端或脚本中直接调用代理连接。 静态住宅代理包含 **原生住宅 IP** 与 **ISP IP** 两种线路类型，均支持账号密码子账号认证，且出口 IP 在连接期间保持固定不变。

### HTTP代理 <a href="#http-dai-li" id="http-dai-li"></a>

```shellscript
curl -x http://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT https://ipinfo.io
```

### SOCKS5代理 <a href="#socks5-dai-li" id="socks5-dai-li"></a>

```shellscript
curl --socks5 USERNAME:PASSWORD@PROXY_IP:PROXY_PORT https://ipinfo.io
```

### 关键参数说明 <a href="#guan-jian-can-shu-shuo-ming" id="guan-jian-can-shu-shuo-ming"></a>

<table><thead><tr><th width="258.79998779296875">参数</th><th>说明</th></tr></thead><tbody><tr><td><code>USERNAME</code></td><td>代理连接认证的子账号</td></tr><tr><td><code>PASSWORD</code></td><td>子账号对应的连接密码</td></tr><tr><td><code>PROXY_IP</code></td><td>静态住宅代理出口 IP</td></tr><tr><td><code>PROXY_PORT</code></td><td>代理端口</td></tr><tr><td><code>-x</code></td><td>指定 HTTP 代理模式</td></tr><tr><td><code>--socks5</code></td><td>指定 SOCKS5 代理模式</td></tr><tr><td><code>ipinfo.io</code></td><td>仅用于验证代理连通性和出口地域，可替换为任意目标 URL</td></tr></tbody></table>
