gitduk / clash-rules

🚀 生成适用于 subconverter 外部配置 ruleset 字段的规则文件。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

简介

本项目生成适用于 subconverter 外部配置 ruleset 字段的规则文件 。使用 GitHub Actions 北京时间 6:30 自动构建,保证规则最新。

说明

本项目规则集(RULE-SET)的数据主要来源于项目:

本项目 GitHub Actions 主要参考 @Loyalsoldier/clash-rules 的 Action 文件

规则文件列表

建议 文件 国内访问链接
直连 直连域名列表 direct.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/direct.txt
直连 局域网 IP 及保留 IP 地址列表 lancidr.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/lan_cidr.txt
直连 **大陆 IP 地址列表 cn_cidr.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/cn_cidr.txt
直连 iCloud 域名列表 icloud.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/icloud.txt
代理 代理域名列表 proxy.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/proxy.txt
代理 GFWList 域名列表 gfw.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/gfw.txt
代理 openai 域名列表 openai.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/openai.txt
REJECT 广告域名列表 reject.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/reject.txt

无法访问 raw.githubusercontent.com 域名的情况下可在文件链接前面加上 https://ghproxy.com/

以例 direct.txt 为例:https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/direct.txt

规则重复

规则集合是从各个开源项目中搜集而来,会导致生成的 clash 配置文件有重复的规则,于是有了去重规则列表:

建议 文件 国内访问链接
代理 代理去重域名列表 proxy-uniq.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/proxy-uniq.txt
直连 直连去重域名列表 direct-uniq.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/direct-uniq.txt
REJECT 广告去重域名列表 reject-uniq.txt https://ghproxy.com/https://raw.githubusercontent.com/gitduk/clash-rules/release/reject-uniq.txt

使用方式

前提是在本地搭建好 subconverter 服务,搭建教程见 subconverter-docker

curl -sSL "http://127.0.0.1:25500/sub?target=clash&new_name=true&url=<urlencode 后的订阅链接>&config=<urlencode 后的外部配置文件链接>" > config.yaml

external.ini 文件为例:

curl -sSL "http://127.0.0.1:25500/sub?target=clash&url=<urlencode 后的订阅链接>&config=https%3A%2F%2Fghproxy.com%2Fhttps%3A%2F%2Fraw.githubusercontent.com%2Fgitduk%2Fclash-rules%2Fmain%2Fexternal.ini" > config.yaml

具体请查看 subconverter 外部配置 相关内容。

致谢

About

🚀 生成适用于 subconverter 外部配置 ruleset 字段的规则文件。

License:GNU General Public License v3.0