> For the complete documentation index, see [llms.txt](https://mcreadme.gitbook.io/mc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mcreadme.gitbook.io/mc/function/udp.md).

# 代理UDP/IPv6

* 大部分游戏/部分语音APP，都使用[UDP协议](https://baike.baidu.com/item/UDP/571511?fr=aladdin)传输数据；MC默认情况下只代理[TCP协议](https://baike.baidu.com/item/TCP/33012?fr=aladdin)，如果需要代理这类游戏/软件，请按照本教程开启MC的UDP代理。

{% hint style="danger" %}

* 经测试<mark style="color:red;">**Tproxy**</mark>无法与<mark style="color:red;">**AiProtection智能网络卫士/Qos/流量分析**</mark> 等功能兼容，请先关闭这些功能
* 代理UDP需要您的节点支持，请跟您的<mark style="color:orange;">Vps</mark>/<mark style="color:orange;">节点提供商</mark>确认是否支持
* 代理IPv6不代表您的访问出口还是IPv6，这取决于您的<mark style="color:orange;">Vps</mark>/<mark style="color:orange;">节点提供商</mark>是否支持。
  {% endhint %}

### <mark style="color:blue;">Setp 1：确保您的配置文件已经启用UDP</mark>

请确保您的配置文件已经启用节点UDP（<mark style="color:orange;">只想代理IPv6可略过此步骤</mark>），如果无法确定请按以下操作：

<figure><img src="/files/H2AdfIARWsEADedQxATD" alt=""><figcaption></figcaption></figure>

使用<mark style="color:blue;">MC\_\*内置规则</mark>订阅，勾选<mark style="color:blue;">节点覆写-启用UDP</mark>，订阅一个<mark style="color:orange;">新的支持UDP</mark>的配置文件。

### <mark style="color:blue;">Setp 2：设置Tproxy代理</mark>

<figure><img src="/files/cXmyI9eWEMZvoBdfVTOt" alt=""><figcaption></figcaption></figure>

在【<mark style="color:blue;">高级模式</mark>】选项卡，【<mark style="color:blue;">代理设置</mark>】-【<mark style="color:blue;">代理模式</mark>】选择适合的模式

{% hint style="info" %}

* 代理UDP协议：<mark style="color:blue;">Redir TCP & Tproxy UDP</mark> 或者 <mark style="color:blue;">Tproxy TCP & UDP</mark>
* 支持代理IPv6：<mark style="color:blue;">TProxy TCP</mark> 或者 <mark style="color:blue;">Tproxy TCP & UDP</mark>&#x20;
* 同时代理UDP和IPv6：<mark style="color:blue;">Tproxy TCP & UDP</mark>&#x20;

&#x20;   （<mark style="color:orange;">代理IPv6开关</mark><mark style="color:orange;">**，**</mark><mark style="color:orange;">只有在选中支持的模式时才显示</mark>）
{% endhint %}

### <mark style="color:blue;">Step 3：启动插件，Enjoy\~</mark>

选择配置文件，启动MC。


---

# 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://mcreadme.gitbook.io/mc/function/udp.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.
