> 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/documentation/cn/kai-shi-shi-yong/quick-start-proxies.md).

# 快速开始：代理

只需几分钟，即可通过简单的分步指南开始使用 Oxylabs 代理。

{% hint style="success" %}
已经熟悉基础知识？查看 [代理文档](https://developers.oxylabs.io/products/cn/proxies.md) 或我们的实用 [集成中心](https://developers.oxylabs.io/integrations/cn/proxy-integrations.md).
{% endhint %}

Oxylabs 提供多种代理类型，专为高性能数据抓取和更好的网页访问而设计。虽然 住宅代理、数据中心代理 和 ISP代理 的使用场景不同，但核心集成逻辑几乎相同。

按照下面的分步指南，只需几分钟即可开始使用 Oxylabs 代理：

{% stepper %}
{% step %}

### 设置与凭证

1. **创建账户：** 在以下位置注册： [Oxylabs 控制台](https://dashboard.oxylabs.io/).
2. **添加产品实例：** 点击 **+ 添加产品实例** 并选择您的代理方案（住宅代理、移动代理、数据中心代理或 ISP代理）
3. **设置您的代理：** 选择代理类型、实例名称，（如果选择了基于 IP 的类型， [设置您的 IP](https://developers.oxylabs.io/documentation/cn/kong-zhi-mian-ban/guan-li-ip-chan-pin.md#docs-internal-guid-26b69515-7fff-79cb-231a-7643f96de4a1)）、认证设置，并创建该实例。
4. **获取凭证：** 在概览实例表中点击您的代理产品，并确认您的代理用户凭据。

{% hint style="info" %}
要免费试用我们的代理，请领取 5 美元 [欢迎赠金](https://developers.oxylabs.io/documentation/cn/kong-zhi-mian-ban/ji-yu-ji-fen-de-ji-fei.md#free-credits-welcome-credit).
{% endhint %}
{% endstep %}

{% step %}

### 你的第一个请求

测试连接最有效的方法是使用 cURL 命令。复制下面的模板，并将占位符替换为以下内容中的值： **代理详情** 在 **第 3 步**.

```bash
curl -x ENDPOINT:PORT -U "PREFIX-USERNAME:PASSWORD" https://ip.oxylabs.io/location
```

{% endstep %}

{% step %}

### 代理详情

在下方找到您的具体产品，以确定正确的连接详情：

<table><thead><tr><th width="172">代理类型</th><th width="150">端点</th><th width="115">轮换端口</th><th width="125">用户名前缀</th><th width="127">静态端口</th></tr></thead><tbody><tr><td>住宅代理</td><td><code>pr.oxylabs.io</code></td><td><code>7777</code></td><td><code>customer-</code></td><td>（使用 <code>sessid-</code>)</td></tr><tr><td>移动代理</td><td><code>pr.oxylabs.io</code></td><td><code>7777</code></td><td><code>customer-</code></td><td>（使用 <code>sessid-</code>)</td></tr><tr><td>数据中心代理</td><td><code>dc.oxylabs.io</code></td><td><code>8000</code></td><td><code>user-</code></td><td><code>8001</code> 及以上</td></tr><tr><td>独享数据中心</td><td><code>ddc.oxylabs.io</code></td><td><code>8000</code></td><td><code>user-</code></td><td><code>8001</code> 及以上</td></tr><tr><td>ISP代理</td><td><code>isp.oxylabs.io</code></td><td><code>8000</code></td><td><code>user-</code></td><td><code>8001</code> 及以上</td></tr><tr><td>独享 ISP代理</td><td><code>disp.oxylabs.io</code></td><td><code>8000</code></td><td><code>user-</code></td><td><code>8001</code> 及以上</td></tr></tbody></table>

{% hint style="success" %}
如果您通过我们的销售团队购买了独享数据中心代理（Enterprise），您可以通过 Direct IP 连接（例如， `1.2.3.4:60000` 用于 HTTP 或 `1.2.3.4:1180` 用于 SOCKS5），或者使用您的客户经理提供的端点。用户名无需前缀。
{% endhint %}
{% endstep %}

{% step %}

### 自定义您的请求

基础连接正常后，您可以自定义会话或地理定位：

* **要定位到某个国家：**
  * 住宅代理/移动代理：添加 `-cc-US` 到您的用户名字符串中（相应调整国家/地区代码）。
  * 共享数据中心/ISP：添加 `-country-US` 到您的用户名字符串中（相应调整国家/地区代码）。
  * 独享（DC/ISP）：使用分配给目标国家 IP 的端口（请参阅仪表板中的代理列表）。
* **要保持静态会话：**
  * 住宅代理/移动代理：添加 `-sessid-qwerty123` 到您的用户名字符串末尾。
  * 其他所有类型：更改端口（例如，使用 `8001` 用于 IP #1， `8002` 用于 IP #2，等等）。
* **要更改协议：**
  * HTTP / HTTPS / SOCKS5：在您的客户端中更改连接前缀（`http://`, `https://`，或 `socks5h://`），并使用标准端点。
  * HTTP/3 和 UDP：通过以下方式路由请求： [MASQUE](https://developers.oxylabs.io/products/cn/proxies/residential-proxies/protocols.md#http-3) 在 `masque.oxylabs.io:50000` （仅限住宅代理）。
    {% endstep %}
    {% endstepper %}

### 下一步

既然您已确认连接，接下来可以继续：

* **需要高级功能？** 请参阅以下内容中各类型的完整功能说明： [产品](https://developers.oxylabs.io/products/cn/proxies.md) 部分。
* **使用第三方工具？** 在以下内容中查找 Selenium、Playwright、私有浏览器、代理管理器等的分步指南： [集成](https://developers.oxylabs.io/integrations/cn/proxy-integrations.md) 部分。
* **HTTP/3 和原生 UDP（MASQUE）：** 如果您的目标端点需要原生 HTTP/3 或 QUIC 连接，请参阅 [MASQUE 集成指南](https://developers.oxylabs.io/products/cn/proxies/residential-proxies/protocols.md#http-3) 以获取更多设置详情。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/documentation/cn/kai-shi-shi-yong/quick-start-proxies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
