Remove original ad domains in domain-list-community

This commit is contained in:
loyalsoldier 2020-08-09 09:01:52 +08:00
parent 71ad6509d7
commit bc34b4ccb5
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90

View File

@ -39,7 +39,6 @@ jobs:
echo "::set-env name=PETERLOWE_REJECT_URL::https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext" echo "::set-env name=PETERLOWE_REJECT_URL::https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext"
echo "::set-env name=V2FLY_DIRECT::https://raw.githubusercontent.com/v2fly/domain-list-community/release/cn.txt" echo "::set-env name=V2FLY_DIRECT::https://raw.githubusercontent.com/v2fly/domain-list-community/release/cn.txt"
echo "::set-env name=V2FLY_PROXY::https://raw.githubusercontent.com/v2fly/domain-list-community/release/geolocation-!cn.txt" echo "::set-env name=V2FLY_PROXY::https://raw.githubusercontent.com/v2fly/domain-list-community/release/geolocation-!cn.txt"
echo "::set-env name=V2FLY_REJECT::https://raw.githubusercontent.com/v2fly/domain-list-community/release/category-ads-all.txt"
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)" echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin" echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
shell: bash shell: bash
@ -88,13 +87,11 @@ jobs:
run: | run: |
curl -sSL $EASYLISTCHINA_EASYLIST_REJECT_URL | perl -ne '/^\|\|([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})\^($|\$third-party$)/ && print "$1\n"' | perl -ne 'print if not /^[0-9]{1,3}(\.[0-9]{1,3}){3}$/' > temp-reject.txt curl -sSL $EASYLISTCHINA_EASYLIST_REJECT_URL | perl -ne '/^\|\|([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})\^($|\$third-party$)/ && print "$1\n"' | perl -ne 'print if not /^[0-9]{1,3}(\.[0-9]{1,3}){3}$/' > 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 $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 ${V2FLY_REJECT} | perl -ne '/^(domain|full):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-reject.txt
- name: Reserve `regex` and `keyword` type of rules from v2fly lists to "reserve" files - name: Reserve `regex` and `keyword` type of rules from v2fly lists to "reserve" files
run: | run: |
curl -sSL ${V2FLY_DIRECT} | perl -ne '/^((regex|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > direct-reserve.txt curl -sSL ${V2FLY_DIRECT} | perl -ne '/^((regex|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > direct-reserve.txt
curl -sSL ${V2FLY_PROXY} | perl -ne '/^((regex|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > proxy-reserve.txt curl -sSL ${V2FLY_PROXY} | perl -ne '/^((regex|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > proxy-reserve.txt
curl -sSL ${V2FLY_REJECT} | perl -ne '/^((regex|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' > reject-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: |