Compare commits
8 Commits
2021022722
...
2021110311
Author | SHA1 | Date | |
---|---|---|---|
a409fcb644 | |||
b10802d5f3 | |||
c3b9c36c72 | |||
9666b73222 | |||
3231f9422a | |||
0d943b72cf | |||
fcf4f979dc | |||
18c612c4e9 |
32
.github/workflows/run.yml
vendored
32
.github/workflows/run.yml
vendored
@ -26,12 +26,13 @@ jobs:
|
|||||||
echo "Loyalsoldier_greatfire=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt" >> $GITHUB_ENV
|
echo "Loyalsoldier_greatfire=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt" >> $GITHUB_ENV
|
||||||
echo "felixonmars_apple=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf" >> $GITHUB_ENV
|
echo "felixonmars_apple=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf" >> $GITHUB_ENV
|
||||||
echo "felixonmars_google=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf" >> $GITHUB_ENV
|
echo "felixonmars_google=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf" >> $GITHUB_ENV
|
||||||
echo "ipipnet_chinaiplist=https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt" >> $GITHUB_ENV
|
echo "cn_cidr=https://raw.githubusercontent.com/Loyalsoldier/geoip/release/text/cn.txt" >> $GITHUB_ENV
|
||||||
echo "telegram_cidr=https://core.telegram.org/resources/cidr.txt" >> $GITHUB_ENV
|
echo "lan_cidr=https://raw.githubusercontent.com/Loyalsoldier/geoip/release/text/private.txt" >> $GITHUB_ENV
|
||||||
|
echo "telegram_cidr=https://raw.githubusercontent.com/Loyalsoldier/geoip/release/text/telegram.txt" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Checkout the "hidden" branch
|
- name: Checkout the "hidden" branch
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: hidden
|
ref: hidden
|
||||||
|
|
||||||
@ -91,19 +92,25 @@ jobs:
|
|||||||
- name: Generate cncidr.txt file
|
- name: Generate cncidr.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > cncidr.txt
|
echo "payload:" > cncidr.txt
|
||||||
curl -sSL ${ipipnet_chinaiplist} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print " - |$1|\n"' | sed "s/|/'/g" >> cncidr.txt
|
curl -sSL ${cn_cidr} | perl -ne '/(.+\/\d+)/ && print " - |$1|\n"' | sed "s/|/'/g" >> cncidr.txt
|
||||||
|
|
||||||
- name: Generate telegramcidr.txt file
|
- name: Generate telegramcidr.txt file
|
||||||
run: |
|
run: |
|
||||||
|
echo "payload:" > telegramcidr.txt
|
||||||
curl -sSL ${telegram_cidr} | perl -ne '/(.+\/\d+)/ && print " - |$1|\n"' | sed "s/|/'/g" >> telegramcidr.txt
|
curl -sSL ${telegram_cidr} | perl -ne '/(.+\/\d+)/ && print " - |$1|\n"' | sed "s/|/'/g" >> telegramcidr.txt
|
||||||
|
|
||||||
|
- name: Generate lancidr.txt file
|
||||||
|
run: |
|
||||||
|
echo "payload:" > lancidr.txt
|
||||||
|
curl -sSL ${lan_cidr} | perl -ne '/(.+\/\d+)/ && print " - |$1|\n"' | sed "s/|/'/g" >> lancidr.txt
|
||||||
|
|
||||||
- name: Move files to publish directory
|
- name: Move files to publish directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p publish
|
mkdir -p publish
|
||||||
install -p {apple,icloud,google,proxy,direct,reject,private,gfw,greatfire,tld-not-cn,cncidr,lancidr,telegramcidr}.txt ./publish/
|
cp *.txt ./publish/
|
||||||
|
|
||||||
- name: Release and upload assets
|
- name: Release and upload assets
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v0.1.6
|
||||||
with:
|
with:
|
||||||
name: ${{ env.RELEASE_NAME }}
|
name: ${{ env.RELEASE_NAME }}
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
@ -116,12 +123,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Git push assets to "release" branch
|
- name: Git push assets to "release" branch
|
||||||
run: |
|
run: |
|
||||||
cd publish
|
cd publish || exit 1
|
||||||
git init
|
git init
|
||||||
git config --local user.name "actions"
|
git config --local user.name "github-actions[bot]"
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
git checkout -b release
|
git checkout -b release
|
||||||
git add .
|
git add .
|
||||||
git commit -m "${{ env.RELEASE_NAME }}"
|
git commit -m "${{ env.RELEASE_NAME }}"
|
||||||
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
||||||
git push -f origin release
|
git push -f origin release
|
||||||
|
|
||||||
|
- name: Purge jsdelivr CDN
|
||||||
|
run: |
|
||||||
|
cd publish || exit 1
|
||||||
|
for file in $(ls); do
|
||||||
|
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
|
||||||
|
done
|
||||||
|
16
README.md
16
README.md
@ -1,10 +1,10 @@
|
|||||||
# 简介
|
# 简介
|
||||||
|
|
||||||
本项目生成适用于 [**Clash Premium 内核**](https://github.com/Dreamacro/clash/releases/tag/premium) 的规则集(RULE-SET),同时适用于所有使用 Clash Premium 内核的 Clash GUI 客户端。使用 GitHub Actions 北京时间每天早上 6:30 自动构建,保证规则最新。
|
本项目生成适用于 [**Clash Premium 内核**](https://github.com/Dreamacro/clash/releases/tag/premium)的规则集(RULE-SET),同时适用于所有使用 Clash Premium 内核的 Clash 图形用户界面(GUI)客户端。使用 GitHub Actions 北京时间每天早上 6:30 自动构建,保证规则最新。
|
||||||
|
|
||||||
## 说明
|
## 说明
|
||||||
|
|
||||||
本项目的规则集(RULE-SET)主要来源于项目 [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat) 和 [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community);[`Apple`](https://github.com/Loyalsoldier/clash-rules/blob/release/apple.txt) 和 [`Google`](https://github.com/Loyalsoldier/clash-rules/blob/release/google.txt) 列表里的域名来源于项目 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list);中国大陆 IPv4 地址数据使用 [@17mon/china_ip_list](https://github.com/17mon/china_ip_list)。
|
本项目规则集(RULE-SET)的数据主要来源于项目 [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat) 和 [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community);[`Apple`](https://github.com/Loyalsoldier/clash-rules/blob/release/apple.txt) 和 [`Google`](https://github.com/Loyalsoldier/clash-rules/blob/release/google.txt) 列表里的域名来源于项目 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list);中国大陆 IPv4 地址数据使用 [@17mon/china_ip_list](https://github.com/17mon/china_ip_list)。
|
||||||
|
|
||||||
本项目的规则集(RULE-SET)只适用于 Clash **Premium** 版本。Clash Premium 相对于普通版,增加了 **TUN 增强模式**,能接管设备所有 TCP 和 UDP 流量,类似 [Surge for Mac](https://nssurge.com) 的增强模式。更多高级特性请看[官方 wiki](https://github.com/Dreamacro/clash/wiki/premium-core-features)。
|
本项目的规则集(RULE-SET)只适用于 Clash **Premium** 版本。Clash Premium 相对于普通版,增加了 **TUN 增强模式**,能接管设备所有 TCP 和 UDP 流量,类似 [Surge for Mac](https://nssurge.com) 的增强模式。更多高级特性请看[官方 wiki](https://github.com/Dreamacro/clash/wiki/premium-core-features)。
|
||||||
|
|
||||||
@ -226,6 +226,8 @@ rules:
|
|||||||
- RULE-SET,google,DIRECT
|
- RULE-SET,google,DIRECT
|
||||||
- RULE-SET,proxy,PROXY
|
- RULE-SET,proxy,PROXY
|
||||||
- RULE-SET,direct,DIRECT
|
- RULE-SET,direct,DIRECT
|
||||||
|
- RULE-SET,lancidr,DIRECT
|
||||||
|
- RULE-SET,cncidr,DIRECT
|
||||||
- RULE-SET,telegramcidr,PROXY
|
- RULE-SET,telegramcidr,PROXY
|
||||||
- GEOIP,,DIRECT
|
- GEOIP,,DIRECT
|
||||||
- GEOIP,CN,DIRECT
|
- GEOIP,CN,DIRECT
|
||||||
@ -294,11 +296,21 @@ rules:
|
|||||||
- MATCH,DIRECT
|
- MATCH,DIRECT
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 激赏 | Donation
|
||||||
|
|
||||||
|
- **比特币(BTC)bech32 地址**:bc1qfe4nxcanet4w4ph8pf6qqyf263y68vw26nv9j9
|
||||||
|
- **比特币(BTC)地址**:3PRyneb1D7jFFBakAaJiCRSsxsXAtMr7LN
|
||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
|
- [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)
|
||||||
- [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat)
|
- [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat)
|
||||||
- [@Loyalsoldier/cn-blocked-domain](https://github.com/Loyalsoldier/cn-blocked-domain)
|
- [@Loyalsoldier/cn-blocked-domain](https://github.com/Loyalsoldier/cn-blocked-domain)
|
||||||
- [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist)
|
- [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist)
|
||||||
- [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)
|
- [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)
|
||||||
- [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list)
|
- [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list)
|
||||||
- [@17mon/china_ip_list](https://github.com/17mon/china_ip_list)
|
- [@17mon/china_ip_list](https://github.com/17mon/china_ip_list)
|
||||||
|
|
||||||
|
## 项目 Star 数增长趋势
|
||||||
|
|
||||||
|
[](https://starchart.cc/Loyalsoldier/clash-rules)
|
||||||
|
Reference in New Issue
Block a user