# 配置住宅代理

本指南解释了在最近的控制面板更新后，如何配置和使用**Rapidproxy 动态住宅代理的**用户**名和密码身份验证。**

按照以下步骤操作，您将能够选择代理位置、会话行为，并为您的应用程序或代理工具生成可直接使用的代理凭据。

***

#### 访问用户名和密码身份验证配置页面 <a href="#access-the-user-and-pass-auth-configuration-page" id="access-the-user-and-pass-auth-configuration-page"></a>

1. 登录您的**Rapidproxy 用户中心 (ucenter)**。
2. 导航至：代理 → 轮换住宅代理 → 使用代理 → 用户名和密码验证

```
Proxies → Rotating Residential Proxies → Use Proxy → User & Pass Auth
```

<figure><img src="https://docs.rapidproxy.io/~gitbook/image?url=https%3A%2F%2F3714437495-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FYesC7FUvYuYg4WiqU6o7%252Fuploads%252FaeCmPDW6vTWs5nZ9ent8%252Fuserpassauth.png%3Falt%3Dmedia%26token%3D24933b75-b1dc-4aae-9af3-c233eefa61a4&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=23fdb806&#x26;sv=2" alt=""><figcaption></figcaption></figure>

本部分允许您配置住宅代理参数并根据[子帐户](https://docs.rapidproxy.io/proxies/dynamic-residential-proxy/get-proxy/user-and-pass-auth/creating-sub-account)生成代理凭据。

***

#### 配置代理位置 <a href="#configure-proxy-location" id="configure-proxy-location"></a>

在配置页面，选择您所需的代理位置选项：

* **Server （服务器）** 选择代理服务器节点。
* **Countries （国家/地区）** 选择您的住宅 IP 地址的目标国家/地区。
* **State / Province （州/省（可选））** 将 IP 地址范围缩小到特定州或省。
* **City （城市（可选））** 进一步细化 IP 地址到城市级别。

<figure><img src="https://docs.rapidproxy.io/~gitbook/image?url=https%3A%2F%2F3714437495-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FYesC7FUvYuYg4WiqU6o7%252Fuploads%252FNvvArRXSTbNpqJhe52hh%252Fsetting.png%3Falt%3Dmedia%26token%3D4b84afca-0489-49e8-b899-97f53aa34cf8&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=e97b27e0&#x26;sv=2" alt=""><figcaption></figcaption></figure>

> 💡 选择更具体的地理位置可能会减少可用的 IP 地址池。如果您需要更高的轮换多样性，我们建议仅选择国家/地区级别。

***

#### 选择代理协议 <a href="#select-proxy-protocol" id="select-proxy-protocol"></a>

选择您要使用的协议：

* **HTTP**
* **HTTPS**
* **SOCKS5**

请确保所选协议符合您的代理软件或应用程序的要求。

***

#### 配置会话设置 <a href="#configure-session-settings" id="configure-session-settings"></a>

Rapidproxy 支持灵活的会话控制，以适应不同的使用场景：

* **Rotating IP （轮换IP）**
  * IP地址会在每次请求时自动更改，或者以较短的时间间隔更改。
  * 推荐用于网页抓取、价格监控和大规模数据收集。
* **Sticky IP （粘性 IP）**
  * 在可配置的会话持续时间内，IP 地址保持不变。
  * 适用于账户登录、表单提交和会话敏感任务。

选择最适合您工作流程的选项。

***

#### 生成并复制代理凭据 <a href="#generate-and-copy-proxy-credentials" id="generate-and-copy-proxy-credentials"></a>

所有设置配置完成后：

1. 请检查您选择的参数。
2. 复制**Rapidproxy 生成的代理信息**，包括：
   * Proxy host
   * Port
   * Username
   * Password

<figure><img src="https://docs.rapidproxy.io/~gitbook/image?url=https%3A%2F%2F3714437495-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FYesC7FUvYuYg4WiqU6o7%252Fuploads%252FouoYjV0cSHdO6oqlNjK6%252Fhostname.png%3Falt%3Dmedia%26token%3D4a9eea91-288b-4b7d-9bb6-18f4b8cff2ac&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=6b47fcdb&#x26;sv=2" alt="" width="375"><figcaption></figcaption></figure>

这些凭据是根据您的配置自动生成的。

***

#### 在您的应用程序或工具中使用代理 <a href="#use-the-proxy-in-your-application-or-tool" id="use-the-proxy-in-your-application-or-tool"></a>

将生成的代理凭据粘贴到您首选的代理软件、浏览器扩展程序、自动化工具或脚本中。

**Rapidproxy 住宅代理与大多数支持用户名和密码身份验证**的工具兼容。

***

#### 注意事项和最佳实践 <a href="#notes-and-best-practices" id="notes-and-best-practices"></a>

* 请确保您使用的子账户处于**激活状态**且有足够的流量。
* 如果身份验证失败，请仔细检查用户名、密码和所选协议。
* 为了获得更好的稳定性，在需要保持会话时请使用**粘性 IP 。**


---

# Agent Instructions: 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.rapidproxy.io/simplified-mandarin/dai-li/dong-tai-zhu-zhai-dai-li/huo-qu-dai-li/yong-hu-ming-he-mi-ma-ren-zheng/pei-zhi-zhu-zhai-dai-li.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.
