id: 1cc1a244d6fb441197f698d317dd5de4
parent_id: 
item_type: 1
item_id: c9f34d9b878449b68d7dd6bd1f1f7100
item_updated_time: 1764345496305
title_diff: "[{\"diffs\":[[1,\"Clash使用Parser添加自定义规则并防止更新覆盖\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":27}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>Clash使用Parser添加自定义规则并防止更新覆盖</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"24886\\\"></a>\\\r\\\n<h1>Clash使用Parser添加自定义规则并防止更新覆盖</h1>\\\r\\\n\\\r\\\n<div><span>\\\n  <div style=\\\"--en-clipped-content:simplified; --en-clipped-source-url:https://juejin.cn/post/6904585933027295246; --en-clipped-source-title:Clash使用Parser添加自定义规则并防止更新覆盖;\\\">\\\n<div><br/></div><div style=\\\"min-height: 7466px; font-size: 16px; display:block; min-width: 100%;\\\"> <div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;\\\"><div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;font-family:&quot;PT Serif&quot;;font-size:16px;line-height:1.5em;color:rgb(31, 9, 9);text-align:left;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:36em;z-index:200;padding-left:2em;padding-right:2em;margin-left:auto;margin-right:auto;position:relative;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;margin-left:-25px;margin-right:25px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;padding-top:0px;padding-bottom:9em;position:relative;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;margin-bottom:0px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><h1 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;border:0px;font:inherit;vertical-align:baseline;font-size:35px;font-weight:normal;line-height:35px;margin-bottom:20px;padding:0px;margin:0px;\\\">方法详细介绍</h1><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;height:1em;line-height:1;text-align:center;margin:0px;padding-top:1.5em;padding-bottom:1.5em;margin-bottom:0px;\\\"><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;opacity:0.5;margin:0px;margin-bottom:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;margin:0px;opacity:0.5;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"></span></div></div></div>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">Note:</strong> 使用该方法需要Clash版本高于0.11.10，如果低于该版本，请先上github下载安装包进行更新。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">传送门：</strong> <a href=\\\"https://github.com/Dreamacro/clash/releases/tag/v1.3.0\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\">Clash下载地址</a></p>\\\n<ol style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;margin:0px 0px 1.5em 1.5em;list-style:none;margin-top:-1em;list-style-type:decimal;\\\">\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\">打开<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Setting</code>（设置），找到<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Profiles</code>（配置文件下）的<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Parsers</code>。</li>\\\n</ol>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/ed9dcdae780e47dabb369418dbcf9e36\\\" type=\\\"image/png\\\" data-filename=\\\"570958e980a94dbfabc52b2bda684658~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<ol style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;margin:0px 0px 1.5em 1.5em;list-style:none;margin-top:-1em;list-style-type:decimal;\\\">\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\">点击右侧的<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Edit</code>，打开编辑界面。</li>\\\n</ol>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/c603b5750bbc44079011dcfa97c586d8\\\" type=\\\"image/png\\\" data-filename=\\\"6bdf1bf343804662a58c861d97ba95ae~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<ol style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;margin:0px 0px 1.5em 1.5em;list-style:none;margin-top:-1em;list-style-type:decimal;\\\">\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\">输入以下代码（以下为示例代码，需要根据自身情况进行改动）：</li>\\\n</ol>\\\n<pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">parsers: # array\\\n  - url: https://sub.paasi.com/subscribe/5**490/J*****oGHBE\\\n    yaml:\\\n      prepend-rules:\\\n        - DOMAIN-SUFFIX,notion.so,GLOBAL\\\n\\t- DOMAIN-SUFFIX,medium.com,GLOBAL\\\n复制代码</code></pre>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">其中需要改动的有 <strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">url</strong> 和 <strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">prepend-rules</strong>。</p>\\\n<ul style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;margin:0px 0px 1.5em 1.5em;list-style:none;margin-top:-1em;list-style-type:disc;\\\">\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\">url：改成本人的订阅地址，如果不知道，可以直接在<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Profiles</code>下点击当前订阅的<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Change imformation</code>，复制其中的URL即可。</li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\">prepen-rules 此处添加你的自定义规则，每一条占一行，按照<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">规则类型</code>，<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">值</code>，<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">代理策略</code>排列，使用逗号分隔。注意的是，每一行都需要以一个短横线 <code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">-</code> 加一个空格  开头，同时注意对齐。具体的自定义规则如何书写在本文的后半部分有说明。</li>\\\n</ul>\\\n<ol style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;margin:0px 0px 1.5em 1.5em;list-style:none;list-style-type:decimal;\\\">\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\">点击右下角保存，在<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Profiles</code>里更新订阅，这样就可以将新的规则添加上了。可以点击<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Edit rules</code>查看规则进行验证。之后打开相应网页看是否生效。</li>\\\n</ol>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/80971c92058b46e5ad53bedec34398cb\\\" type=\\\"image/png\\\" data-filename=\\\"8437c44306d94b9d9b7bddeceb782793~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/a0877356c28041a4b9c164446db92362\\\" type=\\\"image/png\\\" data-filename=\\\"614a130790d94f38a58b6767cf8be332~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/74d895006c444a77889816791f401189\\\" type=\\\"image/png\\\" data-filename=\\\"15b08b28f1a7488aac9d4015db14ff6c~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/b824c48901c44b21a1844fc8bcb2da7c\\\" type=\\\"image/png\\\" data-filename=\\\"50cb04e6421d473c9f5783692f05e40a~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"354\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<h1 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:35px;font-weight:normal;line-height:35px;margin-bottom:20px;\\\">自定义规则的书写方式</h1>\\\n<h2 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;line-height:35px;font-size:15px;margin-top:4px;margin-bottom:20px;\\\">规则类型的选择</h2>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">目前Clash支持的规则类型如下:</span></p>\\\n<ul style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;margin:0px 0px 1.5em 1.5em;list-style:none;margin-top:-1em;list-style-type:disc;\\\">\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">DOMAIN-SUFFIX：域名后缀匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">DOMAIN：域名匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">DOMAIN-KEYWORD：域名关键字匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">IP-CIDR：IP段匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">SRC-IP-CIDR：源IP段匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">GEOIP：GEOIP数据库（国家代码）匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">DST-PORT：目标端口匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">SRC-PORT：源端口匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">PROCESS-NAME：源进程名匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">RULE-SET：Rule Provider规则匹配</span></li>\\\n<li style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-type:inherit;list-style-position:outside;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(234, 226, 96);transition:background-color 0.4s ease 0s;color:black;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">MATCH：全匹配</span></li>\\\n</ul>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">其中我们使用最多的就是<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">DOMAIN-SUFFIX</code>域名后缀了。以 <a href=\\\"https://docs.cfw.lbyczf.com/contents/mixin.html\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\">docs.cfw.lbyczf.com/contents/mi…</a> 为例，该网址的域名就是<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">docs.cfw.lbyczf.com</code>。后缀就是域名从后往前数形成的部分。有些公司会在基础域名上加上前缀，将其解析到一个独立的IP地址。比如<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">world.taobao.com</code>，是在<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">taobao.com</code>前加上了域名前缀<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">world</code>。还有一个常见的前缀是<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">www</code>。如果我需要将<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">world.taobao.com</code>和<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">taobao.com</code>都添加到自定义规则中。我们就可以使用域名后缀<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">DOMAIN-SUFFIX</code>这一类型，同时将值填写为<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">taobao.com</code>就可以了。一般情况下都建议使用<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">DOMAIN-SUFFIX</code>，而不是<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">DOMAIN</code>，因为很多时候你不知道你的使用的服务的域名结构，很多时候会跳转到一个带前缀的子域名上，这个时候突然发现打不开了就很尴尬。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">其余规则类型根据说明大家也可以基本猜到其用法，读者可以自行探索。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">Note:</strong></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">使用<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">PROCESS-NAME</code>需要 Clash for Windows v0.11.5 及以上版本；规则需要匹配完整的进程名（包括可执行文件后缀）方可生效；该规则不适用于TAP流量。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">用户界面暂不支持添加<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">RULE-SET</code>规则，请手动编辑配置文件。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">MATCH</code>需要位于规则列表末尾。</p>\\\n<h2 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">代理策略的选择</h2>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">自定义规则的第二部分<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">值</code>根据规则类型和需求进行填写，自定义规则的第三部分就是<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">代理策略</code>，在这里可以填写代理节点或者策略，有哪一些代理和策略可供选择可以通过Clash进行查看，点击Profiles，选择你的订阅，点击Edit rules进入规则编辑界面，点击Add, 下拉即可看到所有的可选节点或策略。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/913adc06c4fc4cc9b2fafcbe32c7d344\\\" type=\\\"image/png\\\" data-filename=\\\"aea5679a2b22429c987aaee388178857~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/f6d7bcca24e54ae3bfc9e0ae7a86d017\\\" type=\\\"image/png\\\" data-filename=\\\"514c985057f34963a54188475e790139~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">一般情况我们使用<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">DIRECT</code>，<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">GLOBAL</code>，<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">REJECT</code>。<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">DIRECT</code>表示不走代理，即不通过代理节点直接连接。<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">GLOBAL</code>则是走全局代理节点。<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">REJECT</code>则表示禁止连接，使用<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">REJECT</code>后，将会屏蔽对应网站。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">有一些订阅还提供了很多自制的策略，读者可以自行尝试。使用时直接输入名字即可，中文也是支持的哦。有人可能会问，<strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">前面有奇奇怪怪的符号怎么办？</strong></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">点击<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">General</code>，点击<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Home Directory</code>下的<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Open Folder</code>，打开配置文件夹，点击<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Profiles</code>,找到对应的<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">yml</code>文件，用<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">Notepad++</code>等软件打开，直接复制粘贴就可以啦。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/5f5d5fb5ab5f47968f02a4d07def2b95\\\" type=\\\"image/png\\\" data-filename=\\\"905a3bafaaee4e8e930495b8ea435d1a~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"409\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/7b490fe876d940a3920e40eea0ac819f\\\" type=\\\"image/png\\\" data-filename=\\\"9c3ce540558e41cd8fed53f970a6a682~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"325\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\":/35c0ee970bb84ecda69a49e396e296c7\\\" type=\\\"image/png\\\" data-filename=\\\"fa280ae3535145d696d691831f7d13b6~tplv-k3u1fbpfcp-zoom-1.image\\\" height=\\\"292\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">至此，规则的书写就介绍完毕啦，下面是几个正确的示例：</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">IP-CIDR,123.253.240.0/22,DIRECT</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">DOMAIN-SUFFIX,netflixdnstest0.com,代理</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">DOMAIN-SUFFIX,flash.cn,REJECT</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">DOMAIN-SUFFIX,notion.so,GLOBAL</p>\\\n<h1 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:35px;font-weight:normal;line-height:35px;margin-bottom:20px;\\\">原理介绍</h1>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">为什么这种方法能够防止覆盖呢？原因是Parser功能是配置文件进行预处理，因此，每一次更新都会执行一次Parser，因此自定义规则会永远存在，只要你不删除Parser。</p>\\\n<h1 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:35px;font-weight:normal;line-height:35px;margin-bottom:20px;\\\">拓展</h1>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">Parser是一个非常强大的功能，可以通过这个功能对订阅文件进行许多预处理，达到许多非常丰富的效果。但是这个功能对于小白来说并不太友好，有兴趣的读者可以查看Clash的文档进行学习。祝大家都能愉快的工作和学习~</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">传送门：</strong><a href=\\\"https://docs.cfw.lbyczf.com/contents/parser.html\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\">Clash文档</a></p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;margin-bottom:0px;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\">封面图源网络，侵删。 <br/> 文章转载请注明出处和作者，欢迎转载。</p>\\\n<span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote></div></div></div></div></div></div></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":31187}]"
metadata_diff: {"new":{"id":"c9f34d9b878449b68d7dd6bd1f1f7100","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345716393,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:12:34.488Z
created_time: 2025-11-28T16:12:34.488Z
type_: 13