> 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。
