> 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/api-shi-yong-zhi-nan/ren-zheng-fang-shi-shuo-ming.md).

# 认证方式说明

IPWO 支持 [**用户名密码认证**](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/huo-qu-dai-li-xin-xi/yong-hu-ming-mi-ma-ren-zheng.md) 和 **IP 白名单认证** 两种方式。您可以根据业务场景选择适合的认证方式。

***

### 一、用户名密码认证（推荐）

用户名密码认证是最常用的连接方式，适用于：

* API 调用
* 数据采集
* 浏览器配置
* 云服务器部署
* 动态 IP 环境

代理信息示例：

```
Host:
us.ipwo.net

Port:
7878

Username:
username_custom_zone_us

Password:
password
```

***

#### cURL 示例

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

***

#### 优势

* 配置简单
* 支持动态网络环境
* 支持多台服务器同时使用
* 兼容大部分开发语言和工具

***

### 二、[IP 白名单](/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#di-yi-bu-pei-zhi-ip-bai-ming-dan)认证

IP 白名单认证通过授权服务器公网 IP 的方式完成身份验证，无需在代码中填写用户名和密码。

适用于：

* 固定 IP 服务器
* 企业内部系统
* 长期运行项目

***

#### 配置流程

```
获取服务器公网 IP
↓
添加到白名单
↓
等待生效
↓
开始使用代理
```

***

#### 白名单示例

```
203.0.113.10
```

将服务器公网 IP 添加到控制台白名单后即可使用。

***

#### 优势

* 无需在代码中存储密码
* 便于服务器统一管理
* 适合长期部署项目

***

### 三、如何选择？

| 场景          | 推荐认证方式 |
| ----------- | ------ |
| 本地开发测试      | 用户名密码  |
| 云服务器部署      | 用户名密码  |
| 动态公网 IP     | 用户名密码  |
| 固定公网 IP 服务器 | IP 白名单 |
| 企业内部系统      | IP 白名单 |

对于大多数开发者，推荐优先使用 **用户名密码认证**。

***

### 四、常见问题

#### [407 Proxy Authentication Required](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/407-proxy-authentication-required.md)

通常是：

* 用户名错误
* 密码错误
* Zone 参数错误
* 白名单未生效

***

#### [白名单不生效](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/bai-ming-dan-bu-sheng-xiao.md)

请检查：

* 添加的是公网 IP 而非内网 IP
* 当前服务器 IP 是否发生变化
* 是否等待白名单同步完成

***

#### 用户名密码正确但无法连接

建议：

* 使用 curl 测试
* 检查网络环境
* 确认代理套餐状态正常

***

### 相关文章

* [获取代理信息](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/huo-qu-dai-li-xin-xi.md)
* [白名单不生效](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/bai-ming-dan-bu-sheng-xiao.md)
* [407 Proxy Authentication Required](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/407-proxy-authentication-required.md)
* [如何检测代理是否生效](/dai-li-jian-ce-yu-yin-si-an-quan/ru-he-jian-ce-dai-li-shi-fou-sheng-xiao.md)
* [如何快速定位问题](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/ru-he-kuai-su-ding-wei-wen-ti.md)

> 推荐先使用用户名密码认证完成测试，确认代理正常后再根据业务需求切换到 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, and the optional `goal` query parameter:

```
GET https://docs.ipwo.net/kai-fa-zhe-wen-dang/api-shi-yong-zhi-nan/ren-zheng-fang-shi-shuo-ming.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
