mirror of
https://github.com/ACL4SSR/ACL4SSR.git
synced 2026-11-22 13:40:06 +00:00
Compare commits
9
Commits
87bcebc124
...
3d41a354a4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d41a354a4 | ||
|
|
2969a868f7 | ||
|
|
41076e58f7 | ||
|
|
6ccb9ff145 | ||
|
|
ffab8f61ca | ||
|
|
3181d7bf5f | ||
|
|
22ad374fb7 | ||
|
|
259afe8321 | ||
|
|
888f54dfac |
No files matched your search
@@ -15,8 +15,8 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ref: master
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
@@ -62,12 +62,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p Clash/mrs
|
mkdir -p Clash/mrs
|
||||||
convert_file() {
|
convert_file() {
|
||||||
local input_file=$1
|
local type=$1
|
||||||
local output_file=$2
|
local format=$2
|
||||||
|
local input_file=$3
|
||||||
|
local output_file=$4
|
||||||
local MAX_RETRIES=3
|
local MAX_RETRIES=3
|
||||||
for ((i=1; i<=MAX_RETRIES; i++)); do
|
for ((i=1; i<=MAX_RETRIES; i++)); do
|
||||||
echo "[Attempt $i/$MAX_RETRIES] Converting $input_file"
|
echo "[Attempt $i/$MAX_RETRIES] Converting $input_file ($type)"
|
||||||
if ./mihomo -f "$input_file" -in clash -out mrs -o "$output_file"; then
|
if ./mihomo convert-ruleset "$type" "$format" "$input_file" "$output_file"; then
|
||||||
echo "Success: $input_file -> $output_file"
|
echo "Success: $input_file -> $output_file"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
@@ -81,27 +83,74 @@ jobs:
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
for file in Clash/Providers/*.yaml; do
|
# 检查 YAML 文件是否有有效内容(排除 payload: 和空行/注释行)
|
||||||
|
has_yaml_content() {
|
||||||
|
local file=$1
|
||||||
|
local content_lines=$(sed '/^payload:$/d; /^#/d; /^$/d' "$file" | wc -l)
|
||||||
|
[ "$content_lines" -gt 0 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# 检查 LIST 文件是否有有效内容(排除注释和空行)
|
||||||
|
has_list_content() {
|
||||||
|
local file=$1
|
||||||
|
local content_lines=$(sed '/^#/d; /^$/d' "$file" | wc -l)
|
||||||
|
[ "$content_lines" -gt 0 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# 处理所有分离文件(包括生成的和已存在的)
|
||||||
|
for file in Clash/Providers/*_domain.yaml Clash/Providers/*_ip.yaml Clash/Providers/Ruleset/*_domain.yaml Clash/Providers/Ruleset/*_ip.yaml; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
filename=$(basename "$file" .yaml)
|
filename=$(basename "$file")
|
||||||
convert_file "$file" "Clash/mrs/${filename}.mrs"
|
if has_yaml_content "$file"; then
|
||||||
|
if [[ "$filename" == *"_domain.yaml" ]]; then
|
||||||
|
base=$(basename "$file" _domain.yaml)
|
||||||
|
convert_file "domain" "yaml" "$file" "Clash/mrs/${base}_domain.mrs"
|
||||||
|
elif [[ "$filename" == *"_ip.yaml" ]]; then
|
||||||
|
base=$(basename "$file" _ip.yaml)
|
||||||
|
convert_file "ipcidr" "yaml" "$file" "Clash/mrs/${base}_ip.mrs"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Skipping empty or invalid file: $file"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in Clash/Ruleset/*.list; do
|
for file in Clash/Ruleset/*_domain.list Clash/Ruleset/*_ip.list; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
filename=$(basename "$file" .list)
|
filename=$(basename "$file")
|
||||||
convert_file "$file" "Clash/mrs/${filename}.mrs"
|
if has_list_content "$file"; then
|
||||||
|
if [[ "$filename" == *"_domain.list" ]]; then
|
||||||
|
base=$(basename "$file" _domain.list)
|
||||||
|
convert_file "domain" "text" "$file" "Clash/mrs/${base}_domain.mrs"
|
||||||
|
elif [[ "$filename" == *"_ip.list" ]]; then
|
||||||
|
base=$(basename "$file" _ip.list)
|
||||||
|
convert_file "ipcidr" "text" "$file" "Clash/mrs/${base}_ip.mrs"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Skipping empty or invalid file: $file"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Conversion completed"
|
echo "Conversion completed"
|
||||||
|
|
||||||
|
# 清理临时文件
|
||||||
|
rm -f Clash/Providers/*_domain.yaml Clash/Providers/*_ip.yaml
|
||||||
|
rm -f Clash/Providers/Ruleset/*_domain.yaml Clash/Providers/Ruleset/*_ip.yaml
|
||||||
|
rm -f Clash/Ruleset/*_domain.list Clash/Ruleset/*_ip.list
|
||||||
|
# 清理 mihomo 二进制文件
|
||||||
|
rm -f mihomo
|
||||||
|
echo "Temporary files cleaned up"
|
||||||
|
|
||||||
|
- name: Get current datetime
|
||||||
|
id: datetime
|
||||||
|
run: echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
message: '[AutoUpdate] Update GFWList rules and mrs files - $(date -u +"%Y-%m-%dT%H:%M:%SZ")'
|
message: '[AutoUpdate] Update GFWList rules and mrs files - ${{ env.DATETIME }}'
|
||||||
push: true
|
push: true
|
||||||
branch: ${{ github.head_ref || github.ref_name }}
|
|
||||||
env:
|
env:
|
||||||
|
DATETIME: ${{ steps.datetime.outputs.datetime }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
+4189
-6020
File diff suppressed because it is too large.
Load diff
+409
-3275
File diff suppressed because it is too large.
Load diff
+43
-50
@@ -1,59 +1,52 @@
|
|||||||
payload:
|
payload:
|
||||||
# Unbreak 白名单 不应该被广告链接的网站
|
|
||||||
|
|
||||||
# Epicgames
|
|
||||||
- DOMAIN-SUFFIX,ol.epicgames.com
|
|
||||||
|
|
||||||
# Getui
|
|
||||||
- DOMAIN-SUFFIX,dizhensubao.getui.com
|
|
||||||
|
|
||||||
# Google
|
|
||||||
- DOMAIN,dl.google.com
|
|
||||||
- DOMAIN-SUFFIX,googletraveladservices.com
|
|
||||||
|
|
||||||
# Mozilla
|
|
||||||
- DOMAIN-SUFFIX,tracking-protection.cdn.mozilla.net
|
|
||||||
|
|
||||||
# Origin
|
|
||||||
- DOMAIN,origin-a.akamaihd.net
|
|
||||||
|
|
||||||
# Tencent
|
|
||||||
- DOMAIN,fairplay.l.qq.com
|
|
||||||
- DOMAIN,livew.l.qq.com
|
|
||||||
- DOMAIN,vd.l.qq.com
|
|
||||||
|
|
||||||
# Strava
|
|
||||||
|
|
||||||
# Umeng
|
|
||||||
- DOMAIN,errlog.umeng.com
|
|
||||||
- DOMAIN,msg.umeng.com
|
|
||||||
- DOMAIN,msg.umengcloud.com
|
|
||||||
|
|
||||||
# Miui 小米
|
|
||||||
- DOMAIN,tracking.miui.com
|
|
||||||
|
|
||||||
# General
|
|
||||||
- DOMAIN,app.adjust.com
|
|
||||||
- DOMAIN,bdtj.tagtic.cn
|
|
||||||
|
|
||||||
# Hypixel Network
|
|
||||||
- DOMAIN,rewards.hypixel.net
|
|
||||||
|
|
||||||
# Koodo Mobile
|
|
||||||
- DOMAIN-SUFFIX,koodomobile.com
|
|
||||||
- DOMAIN-SUFFIX,koodomobile.ca
|
|
||||||
|
|
||||||
# 群晖ddns
|
|
||||||
- DOMAIN-SUFFIX,synology.me
|
|
||||||
- DOMAIN-SUFFIX,DiskStation.me
|
|
||||||
- DOMAIN-SUFFIX,i234.me
|
|
||||||
- DOMAIN-SUFFIX,myDS.me
|
|
||||||
- DOMAIN-SUFFIX,DSCloud.biz
|
- DOMAIN-SUFFIX,DSCloud.biz
|
||||||
- DOMAIN-SUFFIX,DSCloud.me
|
- DOMAIN-SUFFIX,DSCloud.me
|
||||||
- DOMAIN-SUFFIX,DSCloud.mobi
|
- DOMAIN-SUFFIX,DSCloud.mobi
|
||||||
- DOMAIN-SUFFIX,DSmyNAS.com
|
- DOMAIN-SUFFIX,DSmyNAS.com
|
||||||
- DOMAIN-SUFFIX,DSmyNAS.net
|
- DOMAIN-SUFFIX,DSmyNAS.net
|
||||||
- DOMAIN-SUFFIX,DSmyNAS.org
|
- DOMAIN-SUFFIX,DSmyNAS.org
|
||||||
|
- DOMAIN-SUFFIX,DiskStation.me
|
||||||
- DOMAIN-SUFFIX,FamilyDS.com
|
- DOMAIN-SUFFIX,FamilyDS.com
|
||||||
- DOMAIN-SUFFIX,FamilyDS.net
|
- DOMAIN-SUFFIX,FamilyDS.net
|
||||||
- DOMAIN-SUFFIX,FamilyDS.org
|
- DOMAIN-SUFFIX,FamilyDS.org
|
||||||
|
- DOMAIN-SUFFIX,adservice.google.com
|
||||||
|
- DOMAIN-SUFFIX,c.pki.goog
|
||||||
|
- DOMAIN-SUFFIX,cdn-china.ampproject.org
|
||||||
|
- DOMAIN-SUFFIX,cdn.ampproject.org
|
||||||
|
- DOMAIN-SUFFIX,checkin.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,ci.android.com
|
||||||
|
- DOMAIN-SUFFIX,clientservices.googleapis.com
|
||||||
|
- DOMAIN-SUFFIX,cn.investing.com
|
||||||
|
- DOMAIN-SUFFIX,connectivitycheck.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,crl.pki.goog
|
||||||
|
- DOMAIN-SUFFIX,csi.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,dizhensubao.getui.com
|
||||||
|
- DOMAIN-SUFFIX,dl.google.com
|
||||||
|
- DOMAIN-SUFFIX,firebase-settings.crashlytics.com
|
||||||
|
- DOMAIN-SUFFIX,fonts.googleapis.com
|
||||||
|
- DOMAIN-SUFFIX,fonts.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,g0.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,g1.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,g2.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,googletraveladservices.com
|
||||||
|
- DOMAIN-SUFFIX,i.pki.goog
|
||||||
|
- DOMAIN-SUFFIX,i234.me
|
||||||
|
- DOMAIN-SUFFIX,imasdk.googleapis.com
|
||||||
|
- DOMAIN-SUFFIX,koodomobile.ca
|
||||||
|
- DOMAIN-SUFFIX,koodomobile.com
|
||||||
|
- DOMAIN-SUFFIX,myDS.me
|
||||||
|
- DOMAIN-SUFFIX,o.pki.goog
|
||||||
|
- DOMAIN-SUFFIX,ocsp.pki.goog
|
||||||
|
- DOMAIN-SUFFIX,ol.epicgames.com
|
||||||
|
- DOMAIN-SUFFIX,redirector.gvt1.com
|
||||||
|
- DOMAIN-SUFFIX,safebrowsing.googleapis.com
|
||||||
|
- DOMAIN-SUFFIX,ssl.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,static.typepad.com
|
||||||
|
- DOMAIN-SUFFIX,synology.me
|
||||||
|
- DOMAIN-SUFFIX,tools.google.com
|
||||||
|
- DOMAIN-SUFFIX,tracking-protection.cdn.mozilla.net
|
||||||
|
- DOMAIN-SUFFIX,update.googleapis.com
|
||||||
|
- DOMAIN-SUFFIX,www.ampproject.org
|
||||||
|
- DOMAIN-SUFFIX,www.gov.tw
|
||||||
|
- DOMAIN-SUFFIX,www.gstatic.com
|
||||||
|
- DOMAIN-SUFFIX,www.typepad.com
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,53 @@
|
|||||||
|
# 内容:GFWList 白名单
|
||||||
|
# 数量:51条
|
||||||
|
DOMAIN-SUFFIX,DSCloud.biz
|
||||||
|
DOMAIN-SUFFIX,DSCloud.me
|
||||||
|
DOMAIN-SUFFIX,DSCloud.mobi
|
||||||
|
DOMAIN-SUFFIX,DSmyNAS.com
|
||||||
|
DOMAIN-SUFFIX,DSmyNAS.net
|
||||||
|
DOMAIN-SUFFIX,DSmyNAS.org
|
||||||
|
DOMAIN-SUFFIX,DiskStation.me
|
||||||
|
DOMAIN-SUFFIX,FamilyDS.com
|
||||||
|
DOMAIN-SUFFIX,FamilyDS.net
|
||||||
|
DOMAIN-SUFFIX,FamilyDS.org
|
||||||
|
DOMAIN-SUFFIX,adservice.google.com
|
||||||
|
DOMAIN-SUFFIX,c.pki.goog
|
||||||
|
DOMAIN-SUFFIX,cdn-china.ampproject.org
|
||||||
|
DOMAIN-SUFFIX,cdn.ampproject.org
|
||||||
|
DOMAIN-SUFFIX,checkin.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,ci.android.com
|
||||||
|
DOMAIN-SUFFIX,clientservices.googleapis.com
|
||||||
|
DOMAIN-SUFFIX,cn.investing.com
|
||||||
|
DOMAIN-SUFFIX,connectivitycheck.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,crl.pki.goog
|
||||||
|
DOMAIN-SUFFIX,csi.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,dizhensubao.getui.com
|
||||||
|
DOMAIN-SUFFIX,dl.google.com
|
||||||
|
DOMAIN-SUFFIX,firebase-settings.crashlytics.com
|
||||||
|
DOMAIN-SUFFIX,fonts.googleapis.com
|
||||||
|
DOMAIN-SUFFIX,fonts.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,g0.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,g1.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,g2.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,googletraveladservices.com
|
||||||
|
DOMAIN-SUFFIX,i.pki.goog
|
||||||
|
DOMAIN-SUFFIX,i234.me
|
||||||
|
DOMAIN-SUFFIX,imasdk.googleapis.com
|
||||||
|
DOMAIN-SUFFIX,koodomobile.ca
|
||||||
|
DOMAIN-SUFFIX,koodomobile.com
|
||||||
|
DOMAIN-SUFFIX,myDS.me
|
||||||
|
DOMAIN-SUFFIX,o.pki.goog
|
||||||
|
DOMAIN-SUFFIX,ocsp.pki.goog
|
||||||
|
DOMAIN-SUFFIX,ol.epicgames.com
|
||||||
|
DOMAIN-SUFFIX,redirector.gvt1.com
|
||||||
|
DOMAIN-SUFFIX,safebrowsing.googleapis.com
|
||||||
|
DOMAIN-SUFFIX,ssl.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,static.typepad.com
|
||||||
|
DOMAIN-SUFFIX,synology.me
|
||||||
|
DOMAIN-SUFFIX,tools.google.com
|
||||||
|
DOMAIN-SUFFIX,tracking-protection.cdn.mozilla.net
|
||||||
|
DOMAIN-SUFFIX,update.googleapis.com
|
||||||
|
DOMAIN-SUFFIX,www.ampproject.org
|
||||||
|
DOMAIN-SUFFIX,www.gov.tw
|
||||||
|
DOMAIN-SUFFIX,www.gstatic.com
|
||||||
|
DOMAIN-SUFFIX,www.typepad.com
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 203 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user