> 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/mobile-proxies/protocols.md).

# 协议

探索受支持的移动代理协议，并了解如何配置 HTTP、HTTPS、HTTP/3 和 SOCKS5 连接。

## HTTP

我们的文档包含代码示例，展示如何使用 `HTTP` 协议。该协议受常见库和第三方软件支持。

## HTTPS

你也可以使用完全加密的连接，采用 `HTTPS` 协议以获得额外的安全层。为此，你需要添加 `https://` 到你的代理入口点。例如： `https://pr.oxylabs.io:7777` （这也适用于 [**按国家/地区指定的入口节点**](https://developers.oxylabs.io/products/cn/proxies/mobile-proxies/location-settings/country.md#country-specific-entry-nodes)).

请注意，某些库（或其旧版本）以及一些第三方工具可能不支持 `HTTPS` 该协议，因此在修改代码之前请务必再次确认。

## **HTTP/3**

`HTTP3` 可通过能够处理 `UDP` 流量的代理支持，因为它基于 `QUIC`，一种基于 UDP 的传输协议。

标准 `HTTP`/`HTTPS` 代理端点与 `HTTP3`不兼容，因此要代理请求，你需要使用一个 `SOCKS5` 代理，支持 `UDP` 流量，可通过以下专用入口点使用：

```
socks.pr.oxylabs.io:7777
```

大多数常用工具原生不支持 `HTTP3` 经由 `SOCKS5` 使用 `UDP`，因此可能需要自定义实现，例如我们自定义的 HTTP/3 [Go](https://github.com/oxylabs/gohttp3viaSOCKS5UDP), [C#](https://github.com/oxylabs/csharphttp3viaSOCKS5UDP)，以及 [Java](https://github.com/oxylabs/javahttp3viaSOCKS5UDP) 解决方案仓库，位于 GitHub 上。

{% hint style="info" %}
**注意：** 确保你的防火墙允许在所需端口上通过 UDP 流量，因为许多端口默认会阻止 UDP
{% endhint %}

## **SOCKS5**

{% hint style="warning" %}

* `SOCKS5` Google Chrome 不支持代理身份验证。请改用 Mozilla Firefox 或 HTTP 客户端。
* 某些目标网站可以使用 `SOCKS5`。如果你遇到连接错误，请切换到 `HTTP` 或 `HTTPS`.
  {% endhint %}

Oxylabs 移动代理支持 `SOCKS5` 通过 `TCP` 和 `UDP`.

{% hint style="info" %}
`UDP` 配置可能更具挑战性，请联系你的专属客户经理或 [客户支持](mailto:support@oxylabs.io) 以获得帮助。
{% endhint %}

对于 `SOCKS5` 连接，请使用 `socks5h://` 与你的连接字符串一起：

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

#### 位置定向

`SOCKS5` 不支持按国家/地区划分的入口点域名。要定位特定位置，请在你的用户名中包含 [**额外参数**](https://developers.oxylabs.io/products/cn/proxies/mobile-proxies/making-requests.md) （例如，法国）：

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

## 代理端口

代理端口的默认配置包括 `80` 和 `443`，这些标准端口旨在支持 `HTTP` 和 `HTTPS` 协议，如下表所示。要访问其他端口，需要进行合规性验证，请联系我们的 [**支持**](mailto:support@oxylabs.io).

| 协议      | 端口    |
| ------- | ----- |
| `HTTP`  | `80`  |
| `HTTPS` | `443` |


---

# 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/products/cn/proxies/mobile-proxies/protocols.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.
