mirror of
https://github.com/Loyalsoldier/clash-rules.git
synced 2024-11-10 15:25:34 +08:00
Feat: use CIDR from repo @Loyalsoldier/geoip
This commit is contained in:
parent
b10802d5f3
commit
71e5175c73
11
.github/workflows/run.yml
vendored
11
.github/workflows/run.yml
vendored
@ -27,7 +27,8 @@ jobs:
|
|||||||
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 "ipipnet_chinaiplist=https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.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
|
||||||
@ -95,12 +96,18 @@ jobs:
|
|||||||
|
|
||||||
- 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@v0.1.6
|
uses: softprops/action-gh-release@v0.1.6
|
||||||
|
@ -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
|
||||||
@ -301,6 +303,7 @@ rules:
|
|||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
|
- [@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)
|
||||||
|
Loading…
Reference in New Issue
Block a user