mirror of
https://github.com/MetaCubeX/meta-rules-dat.git
synced 2024-12-29 19:44:14 +08:00
Keep full
type of rules
ref: https://github.com/v2fly/domain-list-community/issues/374
This commit is contained in:
parent
c99bec25ad
commit
18f0a8301a
14
.github/workflows/run.yml
vendored
14
.github/workflows/run.yml
vendored
@ -65,7 +65,7 @@ jobs:
|
|||||||
- name: Get and add direct domains into temp-direct.txt file
|
- name: Get and add direct domains into temp-direct.txt file
|
||||||
run: |
|
run: |
|
||||||
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > temp-direct.txt
|
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > temp-direct.txt
|
||||||
curl -sSL ${CUSTOM_DIRECT} | perl -ne '/^(domain|full):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-direct.txt
|
curl -sSL ${CUSTOM_DIRECT} | perl -ne '/^(domain):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-direct.txt
|
||||||
|
|
||||||
- name: Get and add proxy domains into temp-proxy.txt file
|
- name: Get and add proxy domains into temp-proxy.txt file
|
||||||
run: |
|
run: |
|
||||||
@ -76,7 +76,7 @@ jobs:
|
|||||||
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
|
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
|
||||||
curl -sSL $GEQ1AN_RULES_GLOBAL_MEDIA_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+GMedia/ {print $2}' >> temp-proxy.txt
|
curl -sSL $GEQ1AN_RULES_GLOBAL_MEDIA_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+GMedia/ {print $2}' >> temp-proxy.txt
|
||||||
curl -sSL $LHIE1_RULES_PROXY_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+/ {print $2}' >> temp-proxy.txt
|
curl -sSL $LHIE1_RULES_PROXY_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+/ {print $2}' >> temp-proxy.txt
|
||||||
curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^(domain|full):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-proxy.txt
|
curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^(domain):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-proxy.txt
|
||||||
|
|
||||||
- name: Get and add reject domains into temp-reject.txt file
|
- name: Get and add reject domains into temp-reject.txt file
|
||||||
run: |
|
run: |
|
||||||
@ -85,10 +85,10 @@ jobs:
|
|||||||
curl -sSL $PETERLOWE_REJECT_URL | perl -ne '/^127\.0\.0\.1\s([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})$/ && print "$1\n"' >> temp-reject.txt
|
curl -sSL $PETERLOWE_REJECT_URL | perl -ne '/^127\.0\.0\.1\s([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})$/ && print "$1\n"' >> temp-reject.txt
|
||||||
curl -sSL $DANPOLLOCK_REJECT_URL | perl -ne '/^127\.0\.0\.1\s([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})/ && print "$1\n"' | sed '1d' >> temp-reject.txt
|
curl -sSL $DANPOLLOCK_REJECT_URL | perl -ne '/^127\.0\.0\.1\s([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})/ && print "$1\n"' | sed '1d' >> temp-reject.txt
|
||||||
|
|
||||||
- name: Reserve `regexp` and `keyword` type of rules from custom lists to "reserve" files
|
- name: Reserve `full`, `regexp` and `keyword` type of rules from custom lists to "reserve" files
|
||||||
run: |
|
run: |
|
||||||
curl -sSL ${CUSTOM_DIRECT} | perl -ne '/^((regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > direct-reserve.txt
|
curl -sSL ${CUSTOM_DIRECT} | perl -ne '/^((full|regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' | sort --ignore-case -u > direct-reserve.txt
|
||||||
curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^((regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > proxy-reserve.txt
|
curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^((full|regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' | sort --ignore-case -u > proxy-reserve.txt
|
||||||
|
|
||||||
- name: Add proxy, direct and reject domains from "hidden" branch to appropriate temp files
|
- name: Add proxy, direct and reject domains from "hidden" branch to appropriate temp files
|
||||||
run: |
|
run: |
|
||||||
@ -133,7 +133,7 @@ jobs:
|
|||||||
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,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/category-ads-all
|
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,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/category-ads-all
|
||||||
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > reject-tld-list.txt
|
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > reject-tld-list.txt
|
||||||
|
|
||||||
- name: Add `regexp` and `keyword` type of rules back into "cn", "geolocation-!cn" and "category-ads-all" list
|
- name: Add `full`, `regexp` and `keyword` type of rules back into "cn", "geolocation-!cn" and "category-ads-all" list
|
||||||
run: |
|
run: |
|
||||||
[ -f "direct-reserve.txt" ] && cat direct-reserve.txt >> ./community/data/cn
|
[ -f "direct-reserve.txt" ] && cat direct-reserve.txt >> ./community/data/cn
|
||||||
[ -f "proxy-reserve.txt" ] && cat proxy-reserve.txt >> ./community/data/geolocation-\!cn
|
[ -f "proxy-reserve.txt" ] && cat proxy-reserve.txt >> ./community/data/geolocation-\!cn
|
||||||
@ -192,7 +192,7 @@ 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 "actions"
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "action@github.com"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user