1212 - name : Setup Go 1.x.y
1313 uses : actions/setup-go@v3
1414 with :
15- go-version : ^1.19
15+ go-version : ^1.21
1616
1717 - name : Set variables
1818 shell : bash
2525 echo "WIN_SPY=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt" >> $GITHUB_ENV
2626 echo "WIN_UPDATE=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/update.txt" >> $GITHUB_ENV
2727 echo "WIN_EXTRA=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/extra.txt" >> $GITHUB_ENV
28- # ads list
28+ echo "CHINA_MAX_DOMAINS_EXTRA_URL=https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Clash/ChinaMax/ChinaMax_Domain.txt" >> $GITHUB_ENV
29+ # extra ip list
30+ echo "CHINA_MAX_IP_EXTRA_URL=https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Clash/ChinaMax/ChinaMax_IP.txt" >> $GITHUB_ENV
31+ # extra ads list
2932 echo "PETERLOWE_REJECT_URL=https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext" >> $GITHUB_ENV
3033 echo "DANPOLLOCK_REJECT_URL=https://someonewhocares.org/hosts/hosts" >> $GITHUB_ENV
3134 echo "ANTI_AD_REJECT_URL=https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt" >> $GITHUB_ENV
@@ -40,24 +43,24 @@ jobs:
4043 echo "NEODEVPRO_ADS_REJECT_URL=https://raw.githubusercontent.com/neodevpro/neodevhost/master/adblocker" >> $GITHUB_ENV
4144
4245 - name : Checkout the "hidden" branch of this repo
43- uses : actions/checkout@v3
46+ uses : actions/checkout@v4
4447 with :
4548 ref : hidden
4649
4750 - name : Checkout Loyalsoldier/domain-list-custom
48- uses : actions/checkout@v3
51+ uses : actions/checkout@v4
4952 with :
5053 repository : Loyalsoldier/domain-list-custom
5154 path : custom
5255
5356 - name : Checkout v2fly/domain-list-community
54- uses : actions/checkout@v3
57+ uses : actions/checkout@v4
5558 with :
5659 repository : v2fly/domain-list-community
5760 path : community
5861
5962 - name : Checkout cokebar/gfwlist2dnsmasq
60- uses : actions/checkout@v3
63+ uses : actions/checkout@v4
6164 with :
6265 repository : cokebar/gfwlist2dnsmasq
6366 path : gfwlist2dnsmasq
8083
8184 - name : Get and add proxy domains into temp-proxy.txt file
8285 run : |
83- cat ./gfwlist2dnsmasq/temp-gfwlist.txt | 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"' > temp-proxy.txt
8486 curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
8587 curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
8688 curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^(domain):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-proxy.txt
@@ -116,6 +118,8 @@ jobs:
116118 cat temp-proxy.txt | sort --ignore-case -u > proxy-list-with-redundant
117119 cat temp-direct.txt | sort --ignore-case -u > direct-list-with-redundant
118120 cat temp-reject.txt | sort --ignore-case -u > reject-list-with-redundant
121+ # extras
122+ cat $CHINA_MAX_DOMAINS_EXTRA_URL | sort --ignore-case -u > direct-list-with-redundant
119123
120124 - name : Remove redundant domains
121125 run : |
@@ -154,8 +158,10 @@ jobs:
154158 cp ./community/data/geolocation-\!cn proxy-list.txt
155159 cp ./community/data/category-ads-all reject-list.txt
156160
157- - name : Create google-cn, apple-cn, gfw, greatfire lists
161+ - name : Create china-list, google-cn, apple-cn, gfw, greatfire lists
158162 run : |
163+ curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > ./community/data/china-list
164+ curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > china-list.txt
159165 curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "full:$1\n"' > ./community/data/google-cn
160166 curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "full:$1\n"' > ./community/data/apple-cn
161167 cat ./gfwlist2dnsmasq/temp-gfwlist.txt | 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
@@ -173,7 +179,7 @@ jobs:
173179 install -Dp ./geoip.dat ./publish/geoip.dat
174180 install -Dp ./geoip.dat.sha256sum ./publish/geoip.dat.sha256sum
175181 install -Dp ./custom/publish/geosite.dat ./publish/geosite.dat
176- install -p {proxy,direct,reject}-list.txt ./publish/
182+ install -p {china, proxy,direct,reject}-list.txt ./publish/
177183 cd ./publish || exit 1
178184 zip rules.zip {proxy,direct,reject}-list.txt geoip.dat geosite.dat
179185 sha256sum geosite.dat > geosite.dat.sha256sum
@@ -192,10 +198,10 @@ jobs:
192198 - name : Setup Go 1.x.y
193199 uses : actions/setup-go@v3
194200 with :
195- go-version : ^1.19
201+ go-version : ^1.21
196202
197203 - name : Checkout techprober/v2dat
198- uses : actions/checkout@v3
204+ uses : actions/checkout@v4
199205 with :
200206 repository : techprober/v2dat
201207
@@ -260,7 +266,7 @@ jobs:
260266 echo "RELEASE_DATE=$(date +%Y-%m-%d-%H-%M)" >> $GITHUB_ENV
261267
262268 - name : Checkout the master branch of this repo
263- uses : actions/checkout@v3
269+ uses : actions/checkout@v4
264270
265271 - name : Copy artifacts from build job to local path
266272 uses : actions/download-artifact@v3
@@ -282,7 +288,7 @@ jobs:
282288 mv geosite.zip geosite/ publish/
283289
284290 - name : Release and upload assets
285- uses : softprops/action-gh-release@v0.1.15
291+ uses : softprops/action-gh-release@master
286292 with :
287293 name : ${{ env.RELEASE_DATE }}
288294 tag_name : ${{ env.RELEASE_DATE }}
0 commit comments