Compare commits

..

7 Commits

Author SHA1 Message Date
loyalsoldier
2884e764f0 Workflow: purge CDN after a new release 2021-08-28 19:56:27 +08:00
loyalsoldier
11a9629129 Fix: degrade to fix upload 2021-08-09 19:14:19 +08:00
Loyalsoldier
378d76dda6 Chore: change Git user
Reference: https://github.com/Loyalsoldier/geoip/pull/9
2021-03-19 12:41:53 +08:00
loyalsoldier
2e8cc00089 README: refine description 2021-03-11 16:18:22 +08:00
loyalsoldier
300bc9dd3d Chore: refine process rules 2021-02-20 14:58:07 +08:00
loyalsoldier
b5591466cb Fix: unique full type of rules 2021-02-16 20:06:26 +08:00
Loyalsoldier
835ac47326 Refine blacklist mode 2021-01-28 09:19:10 +08:00
2 changed files with 29 additions and 83 deletions

View File

@@ -55,16 +55,16 @@ jobs:
- name: Generate direct.txt file
run: |
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(full:)([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "$2\n"' > direct.txt
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print ".$2\n"' >> direct.txt
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword|full):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print ".$2\n"' >> direct.txt
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(full:)([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "DOMAIN,$2\n"' > ruleset/direct.txt
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "DOMAIN-SUFFIX,$2\n"' >> ruleset/direct.txt
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword|full):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "DOMAIN-SUFFIX,$2\n"' >> ruleset/direct.txt
- name: Generate proxy.txt file
run: |
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(full:)([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "$2\n"' > proxy.txt
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print ".$2\n"' >> proxy.txt
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword|full):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print ".$2\n"' >> proxy.txt
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(full:)([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "DOMAIN,$2\n"' > ruleset/proxy.txt
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "DOMAIN-SUFFIX,$2\n"' >> ruleset/proxy.txt
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword|full):" | perl -ne '/^(domain:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print "DOMAIN-SUFFIX,$2\n"' >> ruleset/proxy.txt
- name: Generate reject.txt file
run: |
@@ -114,7 +114,7 @@ jobs:
mv ruleset ./publish/
- name: Release and upload assets
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v0.1.6
with:
name: ${{ env.RELEASE_NAME }}
tag_name: ${{ env.TAG_NAME }}
@@ -127,12 +127,22 @@ jobs:
- name: Git push assets to "release" branch
run: |
cd publish
cd publish || exit 1
git init
git config --local user.name "actions"
git config --local user.email "action@github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b release
git add .
git commit -m "${{ env.RELEASE_NAME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f -u origin release
- name: Purge jsdelivr CDN
run: |
cd publish || exit 1
for file in $(ls); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
done
for file in $(ls ruleset); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/ruleset/${file}"
done

View File

@@ -4,7 +4,7 @@
## 说明
本项目规则集DOMAIN-SET 和 RULE-SET主要来源于项目 [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat) 和 [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)[`Apple`](https://github.com/Loyalsoldier/surge-rules/blob/release/apple.txt) 和 [`Google`](https://github.com/Loyalsoldier/surge-rules/blob/release/google.txt) 列表里的部分域名来源于项目 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list);中国大陆 IPv4 地址数据使用 [@17mon/china_ip_list](https://github.com/17mon/china_ip_list)。
本项目规则集DOMAIN-SET 和 RULE-SET的数据主要来源于项目 [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat) 和 [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)[`Apple`](https://github.com/Loyalsoldier/surge-rules/blob/release/apple.txt) 和 [`Google`](https://github.com/Loyalsoldier/surge-rules/blob/release/google.txt) 列表里的部分域名来源于项目 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list);中国大陆 IPv4 地址数据使用 [@17mon/china_ip_list](https://github.com/17mon/china_ip_list)。
### ⚠️ 注意:
@@ -112,12 +112,14 @@
```
[Rule]
PROCESS-NAME,v2ray,DIRECT
PROCESS-NAME,xray,DIRECT
PROCESS-NAME,clash,DIRECT
PROCESS-NAME,ss-local,DIRECT
PROCESS-NAME,privoxy,DIRECT
PROCESS-NAME,naive,DIRECT
PROCESS-NAME,trojan,DIRECT
PROCESS-NAME,trojan-go,DIRECT
PROCESS-NAME,naive,DIRECT
PROCESS-NAME,ss-local,DIRECT
PROCESS-NAME,privoxy,DIRECT
PROCESS-NAME,leaf,DIRECT
PROCESS-NAME,Thunder,DIRECT
PROCESS-NAME,DownloadService,DIRECT
PROCESS-NAME,qBittorrent,DIRECT
@@ -147,12 +149,14 @@ FINAL,PROXY,dns-failed
```
[Rule]
PROCESS-NAME,v2ray,DIRECT
PROCESS-NAME,xray,DIRECT
PROCESS-NAME,clash,DIRECT
PROCESS-NAME,ss-local,DIRECT
PROCESS-NAME,privoxy,DIRECT
PROCESS-NAME,naive,DIRECT
PROCESS-NAME,trojan,DIRECT
PROCESS-NAME,trojan-go,DIRECT
PROCESS-NAME,naive,DIRECT
PROCESS-NAME,ss-local,DIRECT
PROCESS-NAME,privoxy,DIRECT
PROCESS-NAME,leaf,DIRECT
PROCESS-NAME,Thunder,DIRECT
PROCESS-NAME,DownloadService,DIRECT
PROCESS-NAME,qBittorrent,DIRECT
@@ -212,40 +216,6 @@ DOMAIN-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/tld-not-
DOMAIN-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/gfw.txt,PROXY,force-remote-dns
DOMAIN-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/greatfire.txt,PROXY,force-remote-dns
RULE-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/telegramcidr.txt,PROXY
GEOIP,AE,PROXY
GEOIP,AU,PROXY
GEOIP,BR,PROXY
GEOIP,CA,PROXY
GEOIP,DE,PROXY
GEOIP,DK,PROXY
GEOIP,ES,PROXY
GEOIP,FI,PROXY
GEOIP,FR,PROXY
GEOIP,GB,PROXY
GEOIP,GR,PROXY
GEOIP,HK,PROXY
GEOIP,ID,PROXY
GEOIP,IL,PROXY
GEOIP,IN,PROXY
GEOIP,IQ,PROXY
GEOIP,IR,PROXY
GEOIP,IT,PROXY
GEOIP,JP,PROXY
GEOIP,KR,PROXY
GEOIP,MO,PROXY
GEOIP,MY,PROXY
GEOIP,NL,PROXY
GEOIP,NO,PROXY
GEOIP,NZ,PROXY
GEOIP,PH,PROXY
GEOIP,RU,PROXY
GEOIP,SA,PROXY
GEOIP,SG,PROXY
GEOIP,TH,PROXY
GEOIP,TR,PROXY
GEOIP,TW,PROXY
GEOIP,US,PROXY
GEOIP,VN,PROXY
FINAL,DIRECT,dns-failed
```
@@ -277,40 +247,6 @@ RULE-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/ruleset/tl
RULE-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/ruleset/gfw.txt,PROXY,force-remote-dns
RULE-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/ruleset/greatfire.txt,PROXY,force-remote-dns
RULE-SET,https://cdn.jsdelivr.net/gh/Loyalsoldier/surge-rules@release/ruleset/telegramcidr.txt,PROXY
GEOIP,AE,PROXY
GEOIP,AU,PROXY
GEOIP,BR,PROXY
GEOIP,CA,PROXY
GEOIP,DE,PROXY
GEOIP,DK,PROXY
GEOIP,ES,PROXY
GEOIP,FI,PROXY
GEOIP,FR,PROXY
GEOIP,GB,PROXY
GEOIP,GR,PROXY
GEOIP,HK,PROXY
GEOIP,ID,PROXY
GEOIP,IL,PROXY
GEOIP,IN,PROXY
GEOIP,IQ,PROXY
GEOIP,IR,PROXY
GEOIP,IT,PROXY
GEOIP,JP,PROXY
GEOIP,KR,PROXY
GEOIP,MO,PROXY
GEOIP,MY,PROXY
GEOIP,NL,PROXY
GEOIP,NO,PROXY
GEOIP,NZ,PROXY
GEOIP,PH,PROXY
GEOIP,RU,PROXY
GEOIP,SA,PROXY
GEOIP,SG,PROXY
GEOIP,TH,PROXY
GEOIP,TR,PROXY
GEOIP,TW,PROXY
GEOIP,US,PROXY
GEOIP,VN,PROXY
FINAL,DIRECT,dns-failed
```