> For the complete documentation index, see [llms.txt](https://docs.ipwo.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipwo.net/kai-fa-zhe-wen-dang/kuai-su-kai-shi/huo-qu-dai-li-xin-xi.md).

# 获取代理信息

在使用代理之前，你需要先获取可用的代理连接信息。\
不同代理类型的获取方式有所不同，请根据你的产品类型选择对应方式。

***

### 🚀 获取方式概览

IPWO 提供两种代理获取方式：

* **用户名 & 密码认证（主要方式）**
* **API 提取**

***

### 🔐 方式一：[用户名 & 密码](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/huo-qu-dai-li-xin-xi/yong-hu-ming-mi-ma-ren-zheng.md)（推荐）

适用于绝大多数场景，直接用于代码或工具中。

***

#### 📌 获取方式

1. 登录用户中心
2. 进入对应代理产品（如「动态住宅代理」）
3. 查看或创建子账户
4. 获取以下信息：

* Host（代理地址）
* Port（端口）
* Username（用户名）
* Password（密码）

***

#### ⚡ 使用示例（推荐）

```bash
curl -x "us.ipwo.net:7878" -U "username:password" https://ipinfo.io
```

***

#### 📌 动态代理示例（带参数）

```bash
curl -x "us.ipwo.net:7878" -U "username_custom_zone_US_sid_12345_time_10:password" https://ipinfo.io
```

👉 说明：

* 参数写在用户名中
* 可控制地区 / session / IP 时长等行为

***

### 🌐 方式二：[API 提取](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/huo-qu-dai-li-xin-xi/api-dong-tai-huo-qu-jin-dong-tai-dai-li.md)

用于通过接口动态获取代理 IP，适用于自动化程序。

***

#### 📌 使用前提

👉 必须先配置[ **IP 白名单**](/huo-qu-yu-pei-zhi-dai-li/ip-bai-ming-dan.md)

未加入白名单将无法调用 API

***

#### ⚡ 获取代理 IP

```bash
curl "YOUR_API_LINK"
```

***

#### 📌 返回示例

```json
{
    "code": 0,
    "success": true,
    "msg": "操作成功",
    "request_ip": "127.0.0.1",
    "data": [
        {"ip" :"1.1.2.2","port" :14566},
        {"ip" :"1.1.2.2","port" :14577},
    ]
}
```

👉 返回结果为：IP + 端口

***

### 📊 按代理类型说明

#### 动态住宅代理/不限量带宽 / 不限量端口代理

* 支持：账密认证 + API 提取
* 适用于：数据采集、自动化任务

***

#### 静态住宅代理

* 仅支持：账密认证
* 在用户中心直接获取固定 IP 信息

***

### ⚡ 快速验证（推荐）

获取代理后，建议先测试是否可用：

```bash
curl -x "host:port" -U "username:password" https://ipinfo.io
```

👉 返回 IP 信息即表示成功

***

### ❗ 常见问题

#### 无法连接代理？

* 检查 Host / Port 是否正确
* 确认账号已开通

***

#### API 无法访问？

* 检查是否已配置 IP 白名单

***

#### 认证失败？

* 检查用户名 / 密码
* 确认参数格式是否正确

***

### 👉 下一步

* 查看「[快速验证](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/kuai-su-yan-zheng.md)」→ 确认代理可用
* 查看「[接入方式](broken://pages/FytZ1eL5v0h0ZG7guXuy)」→ 集成到代码
* 查看「[参数说明](/kai-fa-zhe-wen-dang/api-shi-yong-zhi-nan/dai-li-can-shu-shuo-ming.md)」→ 控制代理行为

***

### 总结

获取代理信息的核心：

* 账密方式 → 直接连接代理
* API 方式 → 获取 IP 列表（需白名单）

👉 建议先完成一次测试，再进行开发接入

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ipwo.net/kai-fa-zhe-wen-dang/kuai-su-kai-shi/huo-qu-dai-li-xin-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
