adblockadguardanticensorshipchinalistclashdnsmasqeasylistgeositegfwgfwlistgreatfire-analyzerproxyroutingshadowsocksssssrsurgev2ray
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fcf4f979dc
Reference: https://github.com/Loyalsoldier/geoip/pull/9 |
4 years ago | |
---|---|---|
.github | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago |
README.md
简介
本项目生成适用于 Clash Premium 内核的规则集(RULE-SET),同时适用于所有使用 Clash Premium 内核的 Clash 图形用户界面(GUI)客户端。使用 GitHub Actions 北京时间每天早上 6:30 自动构建,保证规则最新。
说明
本项目规则集(RULE-SET)的数据主要来源于项目 @Loyalsoldier/v2ray-rules-dat 和 @v2fly/domain-list-community;Apple
和 Google
列表里的域名来源于项目 @felixonmars/dnsmasq-china-list;中国大陆 IPv4 地址数据使用 @17mon/china_ip_list。
本项目的规则集(RULE-SET)只适用于 Clash Premium 版本。Clash Premium 相对于普通版,增加了 TUN 增强模式,能接管设备所有 TCP 和 UDP 流量,类似 Surge for Mac 的增强模式。更多高级特性请看官方 wiki。
Clash Premium 各版本下载地址
- Clash Premium 命令行版(适用于 Windows、macOS、Linux、OpenWRT 等多种平台):https://github.com/Dreamacro/clash/releases/tag/premium
- Clash Premium 图形用户界面版:
- ClashX Pro(适用于 macOS)
- Clash for Windows(适用于 Windows、macOS)
- Clash for Android(适用于 Android)
规则文件地址及使用方式
在线地址(URL)
如果无法访问域名
raw.githubusercontent.com
,可以使用第二个地址(cdn.jsdelivr.net
),但是内容更新会有 12 小时的延迟。以下地址填写在 Clash 配置文件里的rule-providers
里的url
配置项中。
- 直连域名列表 direct.txt:
- 代理域名列表 proxy.txt:
- 广告域名列表 reject.txt:
- 私有网络专用域名列表 private.txt:
- Apple 域名列表 apple.txt:
- iCloud 域名列表 icloud.txt:
- Google 域名列表 google.txt:
- GFWList 域名列表 gfw.txt:
- GreatFire 域名列表 greatfire.txt:
- 非中国大陆使用的顶级域名列表 tld-not-cn.txt:
- Telegram 使用的 IP 地址列表 telegramcidr.txt:
- 局域网 IP 及保留 IP 地址列表 lancidr.txt:
- 中国大陆 IPv4 地址列表 cncidr.txt:
使用方式
关于 Clash Premium 使用方式,请查看官方文档 或 Lancellc's GitBook。
要想使用本项目的规则集,只需要在 Clash 配置文件中添加如下 rule-providers
和 rules
。
Rule Providers 配置方式
rule-providers:
reject:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
path: ./ruleset/reject.yaml
interval: 86400
icloud:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt"
path: ./ruleset/icloud.yaml
interval: 86400
apple:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt"
path: ./ruleset/apple.yaml
interval: 86400
google:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt"
path: ./ruleset/google.yaml
interval: 86400
proxy:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
path: ./ruleset/proxy.yaml
interval: 86400
direct:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt"
path: ./ruleset/direct.yaml
interval: 86400
private:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
path: ./ruleset/private.yaml
interval: 86400
gfw:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt"
path: ./ruleset/gfw.yaml
interval: 86400
greatfire:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt"
path: ./ruleset/greatfire.yaml
interval: 86400
tld-not-cn:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt"
path: ./ruleset/tld-not-cn.yaml
interval: 86400
telegramcidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt"
path: ./ruleset/telegramcidr.yaml
interval: 86400
cncidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
path: ./ruleset/cncidr.yaml
interval: 86400
lancidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
path: ./ruleset/lancidr.yaml
interval: 86400
白名单模式 Rules 配置方式(推荐)
- 白名单模式,意为「没有命中规则的网络流量,统统使用代理」,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户。
- 以下配置中,除了
DIRECT
和REJECT
是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中proxies
或proxy-groups
中的name
。如你直接使用下面的rules
规则,则需要在proxies
或proxy-groups
中手动配置一个name
为PROXY
的 policy。 - 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由
DIRECT
改为PROXY
,以此类推,举一反三。 - 如你不希望进行 DNS 解析,可在
GEOIP
规则的最后加上,no-resolve
,如GEOIP,CN,DIRECT,no-resolve
。
rules:
- PROCESS-NAME,v2ray,DIRECT
- PROCESS-NAME,xray,DIRECT
- PROCESS-NAME,naive,DIRECT
- PROCESS-NAME,trojan,DIRECT
- PROCESS-NAME,trojan-go,DIRECT
- PROCESS-NAME,ss-local,DIRECT
- PROCESS-NAME,privoxy,DIRECT
- PROCESS-NAME,leaf,DIRECT
- PROCESS-NAME,v2ray.exe,DIRECT
- PROCESS-NAME,xray.exe,DIRECT
- PROCESS-NAME,naive.exe,DIRECT
- PROCESS-NAME,trojan.exe,DIRECT
- PROCESS-NAME,trojan-go.exe,DIRECT
- PROCESS-NAME,ss-local.exe,DIRECT
- PROCESS-NAME,privoxy.exe,DIRECT
- PROCESS-NAME,leaf.exe,DIRECT
- PROCESS-NAME,Surge,DIRECT
- PROCESS-NAME,Surge 2,DIRECT
- PROCESS-NAME,Surge 3,DIRECT
- PROCESS-NAME,Surge 4,DIRECT
- PROCESS-NAME,Surge%202,DIRECT
- PROCESS-NAME,Surge%203,DIRECT
- PROCESS-NAME,Surge%204,DIRECT
- PROCESS-NAME,Thunder,DIRECT
- PROCESS-NAME,DownloadService,DIRECT
- PROCESS-NAME,qBittorrent,DIRECT
- PROCESS-NAME,Transmission,DIRECT
- PROCESS-NAME,fdm,DIRECT
- PROCESS-NAME,aria2c,DIRECT
- PROCESS-NAME,Folx,DIRECT
- PROCESS-NAME,NetTransport,DIRECT
- PROCESS-NAME,uTorrent,DIRECT
- PROCESS-NAME,WebTorrent,DIRECT
- PROCESS-NAME,aria2c.exe,DIRECT
- PROCESS-NAME,BitComet.exe,DIRECT
- PROCESS-NAME,fdm.exe,DIRECT
- PROCESS-NAME,NetTransport.exe,DIRECT
- PROCESS-NAME,qbittorrent.exe,DIRECT
- PROCESS-NAME,Thunder.exe,DIRECT
- PROCESS-NAME,ThunderVIP.exe,DIRECT
- PROCESS-NAME,transmission-daemon.exe,DIRECT
- PROCESS-NAME,transmission-qt.exe,DIRECT
- PROCESS-NAME,uTorrent.exe,DIRECT
- PROCESS-NAME,WebTorrent.exe,DIRECT
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- RULE-SET,private,DIRECT
- RULE-SET,reject,REJECT
- RULE-SET,icloud,DIRECT
- RULE-SET,apple,DIRECT
- RULE-SET,google,DIRECT
- RULE-SET,proxy,PROXY
- RULE-SET,direct,DIRECT
- RULE-SET,telegramcidr,PROXY
- GEOIP,,DIRECT
- GEOIP,CN,DIRECT
- MATCH,PROXY
黑名单模式 Rules 配置方式
- 黑名单模式,意为「只有命中规则的网络流量,才使用代理」,适用于服务器线路网络质量不稳定或不够快,或服务器流量紧缺的用户。通常也是软路由用户、家庭网关用户的常用模式。
- 以下配置中,除了
DIRECT
和REJECT
是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中proxies
或proxy-groups
中的name
。如你直接使用下面的rules
规则,则需要在proxies
或proxy-groups
中手动配置一个name
为PROXY
的 policy。
rules:
- PROCESS-NAME,v2ray,DIRECT
- PROCESS-NAME,xray,DIRECT
- PROCESS-NAME,naive,DIRECT
- PROCESS-NAME,trojan,DIRECT
- PROCESS-NAME,trojan-go,DIRECT
- PROCESS-NAME,ss-local,DIRECT
- PROCESS-NAME,privoxy,DIRECT
- PROCESS-NAME,leaf,DIRECT
- PROCESS-NAME,v2ray.exe,DIRECT
- PROCESS-NAME,xray.exe,DIRECT
- PROCESS-NAME,naive.exe,DIRECT
- PROCESS-NAME,trojan.exe,DIRECT
- PROCESS-NAME,trojan-go.exe,DIRECT
- PROCESS-NAME,ss-local.exe,DIRECT
- PROCESS-NAME,privoxy.exe,DIRECT
- PROCESS-NAME,leaf.exe,DIRECT
- PROCESS-NAME,Surge,DIRECT
- PROCESS-NAME,Surge 2,DIRECT
- PROCESS-NAME,Surge 3,DIRECT
- PROCESS-NAME,Surge 4,DIRECT
- PROCESS-NAME,Surge%202,DIRECT
- PROCESS-NAME,Surge%203,DIRECT
- PROCESS-NAME,Surge%204,DIRECT
- PROCESS-NAME,Thunder,DIRECT
- PROCESS-NAME,DownloadService,DIRECT
- PROCESS-NAME,qBittorrent,DIRECT
- PROCESS-NAME,Transmission,DIRECT
- PROCESS-NAME,fdm,DIRECT
- PROCESS-NAME,aria2c,DIRECT
- PROCESS-NAME,Folx,DIRECT
- PROCESS-NAME,NetTransport,DIRECT
- PROCESS-NAME,uTorrent,DIRECT
- PROCESS-NAME,WebTorrent,DIRECT
- PROCESS-NAME,aria2c.exe,DIRECT
- PROCESS-NAME,BitComet.exe,DIRECT
- PROCESS-NAME,fdm.exe,DIRECT
- PROCESS-NAME,NetTransport.exe,DIRECT
- PROCESS-NAME,qbittorrent.exe,DIRECT
- PROCESS-NAME,Thunder.exe,DIRECT
- PROCESS-NAME,ThunderVIP.exe,DIRECT
- PROCESS-NAME,transmission-daemon.exe,DIRECT
- PROCESS-NAME,transmission-qt.exe,DIRECT
- PROCESS-NAME,uTorrent.exe,DIRECT
- PROCESS-NAME,WebTorrent.exe,DIRECT
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- RULE-SET,private,DIRECT
- RULE-SET,reject,REJECT
- RULE-SET,tld-not-cn,PROXY
- RULE-SET,gfw,PROXY
- RULE-SET,greatfire,PROXY
- RULE-SET,telegramcidr,PROXY
- MATCH,DIRECT