# 订阅管理

<figure><img src="https://1927080012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbElCPWLUN7JiinF0Ycv%2Fuploads%2FrVfR9lnMraU0MSE16aGy%2F5.jpg?alt=media&#x26;token=bef42ea2-a3ed-4007-a5db-a34eb4656a57" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">订阅配置：</mark>

#### **配置上传：**

直接导入`*.yaml`文件

{% hint style="info" %}

* \*.yml文件，请重命名为\*.yaml，再上传
* 文件名必须为数字/字母，不能含有特殊符号/中文
  {% endhint %}

#### **配置订阅：**

支持机场的<mark style="color:orange;">**http**</mark>/<mark style="color:orange;">**https**</mark>链接订阅；\ <mark style="color:$primary;">MC\_\*内置规则</mark>支持【SS://】【SSR://】【Vmess\://】等节点订阅。

{% hint style="info" %}

* <mark style="color:$primary;">MC\_\*内置规则</mark>支持多订阅合并，每个订阅请用|分开，如：

&#x20;      [http://aaa.com|https://bbb.com|vmess://cccddd](https://mcreadme.gitbook.io/mc/base/http:/aaa.com|https:/bbb.com|vmess:/cccddd)

* <mark style="color:$primary;">MC\_\*内置规则</mark>支持自定义机场名称，订阅后跟()，如：&#x20;

&#x20;      [http://aaa.com(机场名1)|https://bbb.com(链接名2)](https://mcreadme.gitbook.io/mc/base/http:/aaa.com\(机场名1\)|https:/bbb.com\(链接名2\))

* 由于文本框内容长度限制，订阅框内容一次<mark style="color:orange;">输入太多内容</mark>（约2000字符）可能订阅失败
  {% endhint %}

<mark style="color:orange;">**节点覆写**</mark>**：**&#x4EC5;支持<mark style="color:$primary;">MC\_\*内置规则，</mark>覆写原始订阅节点内容

* 添加Emoji：为节点名称添加对应的emoji国旗图标（通过正则实现，可能对部分节点名称无效）
* 跳过证书：跳过TLS加密节点的证书验证，既给节点添加`skip-cert-verify: true`参数
* 启用UDP：开启节点udp设置，既给proxy添加`udp: true`参数（仅更改配置文件，透明代理时需要配合Tproxy使用，才能正常代理UDP，详见 [**代理UDP**](https://mcreadme.gitbook.io/mc/function/udp#dai-li-udp)）
* 启用TFO：开启节点TCP Fast Open设置，仅支持TCP协议

<mark style="color:orange;">**包含节点**</mark>：仅支持<mark style="color:$primary;">MC\_\*内置规则，</mark>只显示包含关键字的节点，支持正则（如：香港|美国 ，表示包含 香港 和 美国）

<mark style="color:orange;">**排除节点**</mark>：仅支持<mark style="color:$primary;">MC\_\*内置规则，</mark>只显示不包含关键字的节点，支持正则（如：iplc.\*game，表示排除叫 iplc.....game 的）

<mark style="color:orange;">**订阅UA**</mark>：设置订阅请求的UserAgent，默认为：mihomo/1.19.20

{% hint style="info" %}

* 部分机场严格限制UA，如果订阅失败或者启动后无节点，可以尝依次试修改以下UA：

&#x20;      clash-verge/v2.4.7

&#x20;      clash.meta

&#x20;      v2rayN

&#x20;  <mark style="color:$primary;">（或者询问您订阅提供者）</mark>
{% endhint %}

<mark style="color:orange;">**定时更新**</mark>：根据设定时间自动更新订阅（<mark style="color:$primary;">订阅完成后不可修改</mark>，可同订阅名称重新订阅覆盖设置）

{% hint style="info" %}

* <mark style="color:$primary;">**MC\_\*内置规则**</mark>**，根据内核机制：**

&#x20;       每天：每隔86400秒\
&#x20;       三天：每隔259200秒\
&#x20;       一周：每隔604800秒

* <mark style="color:$primary;">**AP\_\*原始规则**</mark>**定时更新策略：**

&#x20;       每天：每日凌晨5点更新\
&#x20;       三天：每周一和周四凌晨5点更新\
&#x20;       一周：每周一凌晨5点更新
{% endhint %}

<mark style="color:orange;">**订阅规则**</mark>：根据需求订阅不同的规则

{% hint style="info" %}

* **MC\_\*内置规则**，推荐小白使用，根据[ACL4SSR规则](https://github.com/ACL4SSR/ACL4SSR/tree/master)修改适配路由定制

&#x20;      <mark style="color:$primary;">支持机场的http/https链接订阅</mark>\
&#x20;      <mark style="color:$primary;">支持【SS://】【SSR://】【Vmess\://】等节点订阅</mark>

* **订阅原始规则**，不建议，大部分机场提供的订阅不适合路由使用

&#x20;      <mark style="color:$primary;">支持机场的http/https等Clash专用链接订阅</mark>\
&#x20;      <mark style="color:$primary;">不支持【SS://】【SSR://】【Vmess\://】等节点订阅</mark>\
&#x20;      <mark style="color:$primary;">不支持订阅合并（仅取第一个http(s)订阅链接）</mark>\
&#x20;      <mark style="color:$primary;">不支持节点覆写</mark>\
&#x20;      <mark style="color:$primary;">不支持节点筛选</mark>
{% endhint %}

<mark style="color:orange;">**订阅名称**</mark>：自定义配置文件名（只支持20位以内的数字/字母，不支持中文/特殊符号）

{% hint style="info" %}
插件会根据<mark style="color:$primary;">选择的规则</mark>插入头部字段：\
MC\_常规规则: MC\_\*\*\*\*\*\
MC\_常规\_无测Ping:MCN\_\*\*\*\*\*\
MC\_多媒体全量:MM\_\*\*\*\*\*\
MC\_多媒体全量\_无测Ping:MMN\_\*\*\*\*\*\
MC\_多媒体全量\_分地区\_延迟最低:MMU\_\*\*\*\*\*\
MC\_多媒体全量\_分地区\_故障转移:MMF\_\*\*\*\*\*\
订阅原始规则:AP\_\*\*\*\*\*
{% endhint %}

<figure><img src="https://1927080012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbElCPWLUN7JiinF0Ycv%2Fuploads%2FAUjUahmdhQEPRZahZraA%2F5a.jpg?alt=media&#x26;token=8ef87ae6-da2a-42c1-a399-1aa4b571bd70" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">订阅设置：</mark>

#### **配置管理：**

<mark style="color:orange;">**下载配置**</mark>：建议在局域网内操作（<mark style="color:$primary;">ddns网络环境可能不能正确识别下载URL</mark>）

<mark style="color:orange;">**删除配置**</mark>：当前使用的配置文件，不允许删除

<mark style="color:orange;">**更新配置**</mark>：仅支持<mark style="color:blue;">AP\_\*原始规则</mark> （下拉列表选中AP\_开头的配置文件即可显示按钮<mark style="color:blue;">）</mark>

{% hint style="warning" %}

* M\*\_开头的<mark style="color:$primary;">MC内置规则</mark>手动更新配置请移步，【ZashBoard面板】-【代理】-【代理提供商】，点击对应的订阅卡片的更新按钮更新，如下图：
  {% endhint %}

<figure><img src="https://1927080012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbElCPWLUN7JiinF0Ycv%2Fuploads%2FRZqJAIioFniOvl1c9fwP%2F6.jpg?alt=media&#x26;token=ec8872f9-9257-41fc-a665-c83bf6985ef3" alt="如图"><figcaption></figcaption></figure>

#### **基础配置：**

<mark style="color:orange;">**编辑基础配置**</mark>：编辑订阅的基础配置内容，具体请查阅 [MihomoWiki-全局配置](https://wiki.metacubex.one/config/general/)。默认配置如下：

```yaml
#本文件很重要，不懂勿动
#端口
mixed-port: 23456
redir-port: 23457
#面板设置
external-controller: 192.168.2.1:9990
external-ui: dashboard
external-ui-name: zashboard
external-ui-url: https://github.com/Zephyruso/zashboard/releases/latest/download/dist-cdn-fonts.zip
secret: "clash"
#缓存设置
profile:
  store-selected: false
  store-fake-ip: false
#GEO数据库
geodata-mode: true
geox-url:
  geoip: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip-lite.dat"
  geosite: "https://testingcf.jsdelivr.net/gh/flyhigherpi/merlinclash_clash_related@refs/heads/master/geosite/geosite.dat"
#启动参数
allow-lan: true
mode: rule
log-level: error
ipv6: false
unified-delay: true
```


---

# Agent Instructions: 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:

```
GET https://mcreadme.gitbook.io/mc/base/subscribe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
