From 1e7b4357016c932f4495559e2305bbf80bbadc1b Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 21 Jan 2021 16:42:50 +0800 Subject: [PATCH] Add private domain list --- .github/workflows/run.yml | 9 ++++++++- README.md | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 37d4d19..cd17912 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -18,6 +18,7 @@ jobs: echo "TAG_NAME=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV echo "custom_icloud=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/icloud.txt" >> $GITHUB_ENV echo "custom_tld_not_cn=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/tld-!cn.txt" >> $GITHUB_ENV + echo "custom_private=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/private.txt" >> $GITHUB_ENV echo "Loyalsoldier_reject=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt" >> $GITHUB_ENV echo "Loyalsoldier_proxy=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt" >> $GITHUB_ENV echo "Loyalsoldier_direct=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt" >> $GITHUB_ENV @@ -49,6 +50,12 @@ jobs: echo "payload:" > apple.txt curl -sSL ${felixonmars_apple} | perl -ne '/^server=\/([^\/]+)\// && print " - |+.$1|\n"' | sed "s/|/'/g" >> apple.txt + - name: Generate private.txt file + run: | + echo "payload:" > private.txt + curl -sSL ${custom_private} | awk -F ':' '/^full:/ {printf " - |%s|\n", $2}' | sed "s/|/'/g" >> private.txt + curl -sSL ${custom_private} | awk -F ':' '/^domain:/ {printf " - |+.%s|\n", $2}' | sed "s/|/'/g" >> private.txt + - name: Generate direct.txt file run: | echo "payload:" > direct.txt @@ -91,7 +98,7 @@ jobs: - name: Move files to publish directory run: | mkdir -p publish - install -p {apple,icloud,google,proxy,direct,reject,gfw,greatfire,tld-not-cn,cncidr,lancidr,telegramcidr}.txt ./publish/ + install -p {apple,icloud,google,proxy,direct,reject,private,gfw,greatfire,tld-not-cn,cncidr,lancidr,telegramcidr}.txt ./publish/ - name: Release and upload assets uses: softprops/action-gh-release@v1 diff --git a/README.md b/README.md index 0741119..211fa8f 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ - **广告域名列表 reject.txt**: - [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/reject.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/reject.txt) - [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt) +- **私有网络专用域名列表 private.txt**: + - [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/private.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/private.txt) + - [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt) - **Apple 域名列表 apple.txt**: - [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/apple.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/apple.txt) - [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt) @@ -109,6 +112,13 @@ rule-providers: path: ./ruleset/direct.yaml interval: 86400 + private: + type: http + behavior: domain + url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt" + path: ./ruleset/private.yaml + interval: 86400 + gfw: type: http behavior: domain @@ -180,6 +190,7 @@ rules: - PROCESS-NAME,WebTorrent,DIRECT - DOMAIN,clash.razord.top,DIRECT - DOMAIN,yacd.haishan.me,DIRECT + - RULE-SET,private,DIRECT - RULE-SET,reject,REJECT - RULE-SET,icloud,DIRECT - RULE-SET,apple,DIRECT @@ -218,6 +229,7 @@ rules: - PROCESS-NAME,WebTorrent,DIRECT - DOMAIN,clash.razord.top,DIRECT - DOMAIN,yacd.haishan.me,DIRECT + - RULE-SET,private,DIRECT - RULE-SET,reject,REJECT - RULE-SET,tld-not-cn,PROXY - RULE-SET,gfw,PROXY