1
0
mirror of https://github.com/MetaCubeX/meta-rules-dat.git synced 2025-11-03 17:46:54 +08:00

Refine geosite:gfw & geosite:greatfire list

This commit is contained in:
loyalsoldier
2020-10-29 03:25:52 +08:00
parent d8eb17e6af
commit 3b5d3a6e3c
2 changed files with 51 additions and 9 deletions

View File

@@ -154,12 +154,17 @@ jobs:
cp ./community/data/geolocation-\!cn proxy-list.txt
cp ./community/data/category-ads-all reject-list.txt
- name: Add `google-cn` and `apple-cn` lists for custom routing settings due to accessibility in China Mainland
- name: Create `google-cn``apple-cn`、`gfw`、`greatfire` lists
run: |
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > ./community/data/google-cn
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > google-cn.txt
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > ./community/data/apple-cn
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > apple-cn.txt
curl -sSL $GFWLIST_DOMAINS_URL | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' >> ./community/data/gfw
curl -sSL $GFWLIST_EXTRAS_DOMAINS_URL | perl -ne 'print if not /^(#|\s)/' >> ./community/data/gfw
cat ./community/data/gfw | sort --ignore-case -u > gfw.txt
curl -sSL $GREATFIRE_DOMAINS_URL | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' >> ./community/data/greatfire
cat ./community/data/greatfire | sort --ignore-case -u > greatfire.txt
- name: Build geosite.dat file
run: |
@@ -172,7 +177,7 @@ jobs:
install -Dp ./custom/publish/dlc.dat ./publish/geosite.dat
install -p {proxy,direct,reject}-tld-list.txt ./publish/
install -p {proxy,direct,reject}-list.txt ./publish/
install -p {apple,google}-cn.txt ./publish/
install -p {apple-cn,google-cn,gfw,greatfire}.txt ./publish/
cd ./publish || exit 1
zip rules.zip {proxy,direct,reject}-list.txt geoip.dat geosite.dat
sha256sum geoip.dat > geoip.dat.sha256sum