> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/proxies/residential-proxies.md).

# 住宅代理

了解 Oxylabs 住宅代理的所有信息，包括代码示例、位置定向参数和故障排查资源。

[**住宅代理**](https://oxylabs.io/products/residential-proxy-pool) 包含由互联网服务提供商（ISP）提供的真实 IP 地址。这些 IP 地址附着在全球各地、国家或城市级别的物理设备上。因此，使用这类代理可以轻松模拟人类行为并避免封锁。

Oxylabs 住宅代理功能齐全，可自动轮换，且易于设置。本文档中包含有关住宅代理和轮换式 ISP代理 集成的所有信息，请从下方章节开始。

## 快速入门

向以下地址发送请求： `https://ip.oxylabs.io/location` 通过我们的 [**backconnect入口**](/products/cn/proxies/residential-proxies/making-requests.md)使用来自随机位置的住宅代理。请替换 `USERNAME` 和 `PASSWORD` 为你的代理用户凭据。请注意，由于 Oxylabs 住宅代理会自动轮换，每个请求都会返回一个新的 IP 地址。

{% hint style="info" %}
使用 [**ip.oxylabs.io/location**](https://ip.oxylabs.io/location) 检查你的 IP 参数——该域名提供来自四个地理位置数据库的信息：MaxMind、IP2Location、DB-IP 和 IPinfo.io。参数包括 IP 地址、提供商、国家、城市、邮政编码、ASN、组织名称和时区。
{% endhint %}

```bash
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME:PASSWORD" https://ip.oxylabs.io/location
```

{% hint style="info" %}
我们的住宅代理支持 `HTTP`, `HTTPS`, `HTTP/3`，以及 `SOCKS5` 协议。你可以在 [**这里**](/products/cn/proxies/residential-proxies/protocols.md).
{% endhint %}

了解更多关于如何使用它们的信息。现在使用来自法国的代理发送请求。你只需将 `cc-FR` 添加到你的用户名字符串中。下面是一个 cURL 示例，你还可以在这里找到 [其他语言的代码示例](/products/cn/proxies/residential-proxies/location-settings/select-country.md).

```bash
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-FR:PASSWORD" https://ip.oxylabs.io/location
```

下面是另一个通过来自英国伦敦的代理发送请求的示例。添加 `cc-GB-city-london` 到用户名字符串中，即可指定城市。点击 [**这里**](/products/cn/proxies/residential-proxies/location-settings/select-city.md) 以获取更多关于如何掌握城市级代理定向的信息。

```shell
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-GB-city-london:PASSWORD" https://ip.oxylabs.io
```

如果你需要在多个请求中保持使用同一个代理，请使用 [**会话控制**](/products/cn/proxies/residential-proxies/session-control.md)**.** 添加 `sessid-abc12345` 到你的用户名字符串中，其中 `abc12345` 可以是任意随机字符串，只要你持续使用这个字符串（会话 ID）发送请求，你就会获得相同的代理 IP。

```shell
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-sessid-randomString123:PASSWORD" https://ip.oxylabs.io/location
```

查看我们的 [**集成教程**](/integrations/cn/proxy-integrations.md) ，适用于最常见的第三方工具，例如 [**ShadowRocket**](/integrations/cn/proxy-integrations/shadowrocket.md), [**SwitchyOmega**](/integrations/cn/proxy-integrations/switchyomega.md) ，或 [**AdsPower**](/integrations/cn/proxy-integrations/adspower.md).

你也可以使用 [**端点生成器**](/products/cn/proxies/residential-proxies/endpoint-generator.md).

登录 [**控制面板**](https://dashboard.oxylabs.io/en/overview/RP)，选择住宅代理，然后点击端点生成器。选择参数并获取一个端点列表，以便将我们的代理与你选择的工具集成。

要查看你的使用统计、生成流量、请求次数等信息，请登录 [**控制面板**](https://dashboard.oxylabs.io/en/)控制面板。你还可以添加代理用户（子用户）并单独跟踪他们的统计数据。

如果你有任何其他问题，请联系你的客户经理或我们的支持团队： [**support@oxylabs.io**](mailto:support@oxylabs.io).


---

# 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://developers.oxylabs.io/products/cn/proxies/residential-proxies.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.
