> 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/yong-hu-ming-mi-ma-ren-zheng.md).

# 用户名 & 密码认证

用户名 & 密码认证是 IPWO 最常用的代理接入方式，适用于绝大多数开发场景。

通过该方式，你可以直接在代码或工具中使用代理，无需额外调用 API。

***

### 🔌 基本用法

使用代理时，需要提供以下信息：

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

***

#### 标准示例（推荐）

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

***

### 📌 动态住宅代理示例

在 IPWO 中，动态代理的**参数通常写在用户名中**：

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

***

#### 参数说明

```
username_custom_zone_US_sid_12345_time_10
```

表示：

* `zone_US` → 指定国家为美国
* `sid_12345` → 使用粘性会话
* `time_10` → IP 保持 10 分钟

👉 不同参数可控制 IP 行为（地区 / 会话 / 时长等）

***

### ⚡ 使用流程

1. 获取代理信息（Host / Port / Username / Password）
2. 按上述格式配置请求
3. 发送请求并验证返回 IP

***

### 💡 使用建议

* 新手优先使用该方式（最简单）
* 建议先使用「快速验证」测试代理
* 参数建议逐步添加，避免一次配置过多
* 每个任务建议使用独立账号（如子账户）

***

### ❗ 常见问题

#### 认证失败（407）

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

***

#### 无法连接代理

* 检查 Host / Port
* 确认代理已开通

***

#### IP 未变化

* 可能使用了固定 session（sid）
* 或未启用轮换 IP

***

### 👉 下一步

* 查看「[参数说明](/kai-fa-zhe-wen-dang/api-shi-yong-zhi-nan/dai-li-can-shu-shuo-ming.md)」→ 控制地区与会话
* 查看「[快速验证](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/kuai-su-yan-zheng.md)」→ 测试代理是否可用
* 查看「[代码示例](/kai-fa-zhe-wen-dang/dai-ma-shi-li.md)」→ 集成到程序

***

### 总结

用户名 & 密码认证的核心是：

* 使用 `-x` 指定代理地址
* 使用 `-U` 传递认证信息
* 通过用户名参数控制代理行为

👉 这是最简单、最常用的代理接入方式

***


---

# 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/yong-hu-ming-mi-ma-ren-zheng.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.
