mirror of
https://github.com/TG-Twilight/AWAvenue-Ads-Rule.git
synced 2025-11-04 14:49:47 +08:00
Move the transition to the build branch
This commit is contained in:
parent
2fac7e6610
commit
6c1d3c8462
65
.github/workflows/build.yaml
vendored
65
.github/workflows/build.yaml
vendored
@ -1,65 +0,0 @@
|
|||||||
name: build Rule
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
execute_python_script:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2.5.0
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.9
|
|
||||||
|
|
||||||
- name: Execute Python script
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
mkdir out
|
|
||||||
python main.py
|
|
||||||
cd out
|
|
||||||
mkdir Filters
|
|
||||||
mv AWAvenue-Ads-Rule-Adguard.txt AWAvenue-Ads-Rule.txt #历史遗留问题
|
|
||||||
mv AWAvenue-Ads-Rule-* Filters/
|
|
||||||
cd Filters
|
|
||||||
wget -O ./sing-box.tar.gz https://github.com/SagerNet/sing-box/releases/download/v1.8.2/sing-box-1.8.2-linux-amd64.tar.gz
|
|
||||||
tar -xzvf sing-box.tar.gz
|
|
||||||
chmod +x */sing-box
|
|
||||||
./*/sing-box rule-set compile AWAvenue-Ads-Rule-Singbox.json
|
|
||||||
./*/sing-box rule-set compile AWAvenue-Ads-Rule-Singbox-regex.json
|
|
||||||
rm -rf *sing-box*
|
|
||||||
ls
|
|
||||||
|
|
||||||
- name: Git push
|
|
||||||
run: |
|
|
||||||
git clone "https://${{ github.actor }}:${{ secrets.TOKEN }}@github.com/${{ github.repository }}" push
|
|
||||||
cp -Rf build/out/* push/
|
|
||||||
cd push
|
|
||||||
files=$(find . -name '*AWAvenue*')
|
|
||||||
echo $files
|
|
||||||
if [[ -n "$(git diff -- $files)" ]] || [[ "$(echo $(git status) | grep 'Untracked files')" ]]; then
|
|
||||||
git config --local user.name "github-actions[bot]"
|
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
git add AWAvenue-Ads-Rule.txt
|
|
||||||
cd Filters
|
|
||||||
git add *AWAvenue*
|
|
||||||
git commit -m "[skip ci] 工作流转换规则: ${{ github.event.head_commit.message }}"
|
|
||||||
git push --set-upstream origin main
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Purge jsdelivr CDN
|
|
||||||
run: |
|
|
||||||
cd push
|
|
||||||
files=$(find . -name '*AWAvenue*')
|
|
||||||
if [[ -n "$(git diff -- $files)" ]] || [[ "$(echo $(git status) | grep 'Untracked files')" ]]; then
|
|
||||||
for file in $files; do
|
|
||||||
url=$(echo $file | sed "s/\.//g")
|
|
||||||
curl -L -v "https://purge.jsdelivr.net/gh/${{ github.repository }}@main/${url}"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
## build
|
|
||||||
|
|
||||||
将[rule](./rule)中的 `domain.txt` `domain_regex.txt` 等基础规则转换
|
|
||||||
|
|
||||||
插件文档见[script](./script)
|
|
||||||
|
|
||||||
# 使用方法
|
|
||||||
```shell
|
|
||||||
python main.py
|
|
||||||
```
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "1.3.3",
|
|
||||||
"out_path": "/out",
|
|
||||||
"domain_name": "domain.txt",
|
|
||||||
"regex_name": "domain_regex.txt",
|
|
||||||
"title": "Title: AWAvenue 秋风广告规则(AWAvenue-Ads-Rule)\n规则版本: version\n更新时间: format_time\n\n项目地址:https://github.com/TG-Twilight/AWAvenue-Ads-Rule\n\n如果需要在其它规则中混合此规则,请在您的规则显眼处注明本规则的出处,谢谢!\n加入Telegram群组 秋風がく山道 (@AWAvenueAdsChat) 与编写者交流,期待着您的到来!\n群组链接:https://t.me/AWAvenueAdsChat\n订阅Telegram频道 AWAvenue Ads Rule (@AWAvenueAdsRule) 获取最新公告,期待着您的订阅!\n频道链接:https://t.me/AWAvenueAdsRule\n\nThis project is licensed under the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.\n\n倾城极速 - 畅游世界,高速互联!官网:https://wcnmdmht.lol/sb 官网2:https://panel.qc02.xyz\n",
|
|
||||||
"suffix": [
|
|
||||||
{"name": "AdClose", "suffix": ".txt", "comment": "!"},
|
|
||||||
{"name": "Adguard", "suffix": ".txt", "comment": "!"},
|
|
||||||
{"name": "Clash", "suffix": ".yaml", "comment": "#"},
|
|
||||||
{"name": "hosts", "suffix": ".txt" , "comment": "#"},
|
|
||||||
{"name": "Surge", "suffix": ".txt" , "comment": "#"},
|
|
||||||
{"name": "Singbox", "suffix": ".json" , "comment": "//"},
|
|
||||||
{"name": "Singbox-regex", "suffix": ".json" , "comment": "//"},
|
|
||||||
{"name": "QuantumultX", "suffix": ".list" , "comment": "##"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
import os
|
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
import importlib
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open("build.json", 'r', encoding="utf-8") as file:
|
|
||||||
config = json.loads(file.read())
|
|
||||||
except Exception as e:
|
|
||||||
print(f"读取json失败: {e}")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
global output, domain_file, domain_file, suffix_file, regex_file
|
|
||||||
current_time = datetime.now()
|
|
||||||
format_time = current_time.strftime("%Y-%m-%d")
|
|
||||||
SCRIPT_PATH = os.path.join(os.getcwd(), "script")
|
|
||||||
RULE_PATH = os.path.join(os.getcwd(), "rule")
|
|
||||||
OUT_PATH = os.getcwd() + config["out_path"]
|
|
||||||
domain_file=RULE_PATH + "/" + config["domain_name"]
|
|
||||||
regex_file=RULE_PATH + "/" + config["regex_name"]
|
|
||||||
|
|
||||||
if not os.path.exists(OUT_PATH):
|
|
||||||
print(f"{OUT_PATH} 目录不存在!")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def WriteFile(name, text):
|
|
||||||
try:
|
|
||||||
for File in config["suffix"]:
|
|
||||||
if name == File["name"]:
|
|
||||||
with open(OUT_PATH + "/AWAvenue-Ads-Rule-" + name + File["suffix"], 'w', encoding="utf-8") as file:
|
|
||||||
title = [File["comment"] + " " + line for line in config["title"].split('\n')]
|
|
||||||
title = '\n'.join(title)
|
|
||||||
file.write(title.replace("version", config["version"]).replace("format_time", format_time) + "\n\n")
|
|
||||||
for line in text:
|
|
||||||
file.write(line + "\n")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"读取json失败: {e}")
|
|
||||||
|
|
||||||
def RunScript():
|
|
||||||
for filename in os.listdir(SCRIPT_PATH):
|
|
||||||
if filename.endswith(".py"):
|
|
||||||
module_name = filename[:-3]
|
|
||||||
full_module_name = f"script.{module_name}"
|
|
||||||
try:
|
|
||||||
module = importlib.import_module(full_module_name)
|
|
||||||
print(f"正在转换:{module_name}")
|
|
||||||
module_list = module.build(domain_file, regex_file)
|
|
||||||
WriteFile(module_name, module_list)
|
|
||||||
except ImportError as e:
|
|
||||||
print(f"转换插件:{module_name}执行失败: {e}")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
RunScript()
|
|
||||||
@ -1,509 +0,0 @@
|
|||||||
1010pic.com
|
|
||||||
8le8le.com
|
|
||||||
a0.app.xiaomi.com
|
|
||||||
aaid.umeng.com
|
|
||||||
ad-scope.com
|
|
||||||
ad-scope.com.cn
|
|
||||||
ad-sdk.huxiu.com
|
|
||||||
ad.12306.cn
|
|
||||||
ad.51wnl.com
|
|
||||||
ad.bwton.com
|
|
||||||
ad.cyapi.cn
|
|
||||||
ad.flurry.com
|
|
||||||
ad.partner.gifshow.com
|
|
||||||
ad.qingting.fm
|
|
||||||
ad.qq.com
|
|
||||||
ad.tencentmusic.com
|
|
||||||
ad.toutiao.com
|
|
||||||
ad.winrar.com.cn
|
|
||||||
ad.xelements.cn
|
|
||||||
ad.xiaomi.com
|
|
||||||
ad.ximalaya.com
|
|
||||||
ad.zijieapi.com
|
|
||||||
adapi.izuiyou.com
|
|
||||||
adapi.yynetwk.com
|
|
||||||
adashbc.ut.taobao.com
|
|
||||||
adc.hpplay.cn
|
|
||||||
adcdn.hpplay.cn
|
|
||||||
adcdn.tencentmusic.com
|
|
||||||
adclick.tencentmusic.com
|
|
||||||
adcolony.com
|
|
||||||
adeng.hpplay.cn
|
|
||||||
adexpo.tencentmusic.com
|
|
||||||
adfilter.imtt.qq.com
|
|
||||||
adjust.cn
|
|
||||||
adkwai.com
|
|
||||||
adlog.flurry.com
|
|
||||||
ads-api-o.api.leiniao.com
|
|
||||||
ads-api.tiktok.com
|
|
||||||
ads-api.twitter.com
|
|
||||||
ads-img-qc.xhscdn.com
|
|
||||||
ads-video-al.xhscdn.com
|
|
||||||
ads-video-qc.xhscdn.com
|
|
||||||
ads.95516.com
|
|
||||||
ads.flurry.com
|
|
||||||
ads.google.cn
|
|
||||||
ads.heytapmobi.com
|
|
||||||
ads.huan.tv
|
|
||||||
ads.icloseli.cn
|
|
||||||
ads.music.126.net
|
|
||||||
ads.oppomobile.com
|
|
||||||
ads.service.kugou.com
|
|
||||||
ads.service.kugou.com
|
|
||||||
ads3-normal-hl.zijieapi.com
|
|
||||||
ads3-normal-lq.zijieapi.com
|
|
||||||
ads5-normal-hl.zijieapi.com
|
|
||||||
ads5-normal-lf.zijieapi.com
|
|
||||||
ads5-normal-lq.zijieapi.com
|
|
||||||
adsense.google.cn
|
|
||||||
adservice.google.cn
|
|
||||||
adservice.google.com
|
|
||||||
adservice.sigmob.cn
|
|
||||||
adserviceretry.kugou.com
|
|
||||||
adsfile.bssdlbig.kugou.com
|
|
||||||
adsfile.bssdlbig.kugou.com
|
|
||||||
adsfilebssdlbig.ali.kugou.com
|
|
||||||
adsfileretry.service.kugou.com
|
|
||||||
adsfs-sdkconfig.heytapimage.com
|
|
||||||
adsfs.oppomobile.com
|
|
||||||
adsmind.gdtimg.com
|
|
||||||
adsmind.ugdtimg.com
|
|
||||||
adsp.xunlei.com
|
|
||||||
adstats.tencentmusic.com
|
|
||||||
adtago.s3.amazonaws.com
|
|
||||||
adtech.yahooinc.com
|
|
||||||
adtrack.quark.cn
|
|
||||||
adukwai.com
|
|
||||||
adv.sec.intl.miui.com
|
|
||||||
adv.sec.miui.com
|
|
||||||
advertiseonbing.azureedge.net
|
|
||||||
advertising-api-eu.amazon.com
|
|
||||||
advertising.apple.com
|
|
||||||
advertising.yahoo.com
|
|
||||||
advertising.yandex.ru
|
|
||||||
advice-ads.s3.amazonaws.com
|
|
||||||
adview.cn
|
|
||||||
adx-cn.anythinktech.com
|
|
||||||
adx-drcn.op.dbankcloud.cn
|
|
||||||
adx.ads.heytapmobi.com
|
|
||||||
adx.ads.oppomobile.com
|
|
||||||
adxlog-adnet.vivo.com.cn
|
|
||||||
adxlog-adnet.vivo.com.cn.dsa.dnsv1.com.cn
|
|
||||||
afs.googlesyndication.com
|
|
||||||
ali-ad.a.yximgs.com
|
|
||||||
amdcopen.m.taobao.com
|
|
||||||
an.facebook.com
|
|
||||||
analysis.yozocloud.cn
|
|
||||||
analytics-api.samsunghealthcn.com
|
|
||||||
analytics.126.net
|
|
||||||
analytics.95516.com
|
|
||||||
analytics.google.com
|
|
||||||
analytics.pinterest.com
|
|
||||||
analytics.rayjump.com
|
|
||||||
analytics.tiktok.com
|
|
||||||
analytics.woozooo.com
|
|
||||||
analyze.lemurbrowser.com
|
|
||||||
api-access.pangolin-sdk-toutiao.com
|
|
||||||
api-access.pangolin-sdk-toutiao.com3
|
|
||||||
api-access.pangolin-sdk-toutiao1.com
|
|
||||||
api-access.pangolin-sdk-toutiao2.com
|
|
||||||
api-access.pangolin-sdk-toutiao3.com
|
|
||||||
api-access.pangolin-sdk-toutiao4.com
|
|
||||||
api-access.pangolin-sdk-toutiao5.com
|
|
||||||
api-ad-product.huxiu.com
|
|
||||||
api-adservices.apple.com
|
|
||||||
api-htp.beizi.biz
|
|
||||||
api.ad.xiaomi.com
|
|
||||||
api.htp.hubcloud.com.cn
|
|
||||||
api.hzsanjiaomao.com
|
|
||||||
api.installer.xiaomi.com
|
|
||||||
api.kingdata.ksyun.com
|
|
||||||
api.statsig.com
|
|
||||||
api5-normal-quic-lf.ixigua.com
|
|
||||||
apiyd.my91app.com
|
|
||||||
apks.webxiaobai.top
|
|
||||||
app-measurement.com
|
|
||||||
applog.lc.quark.cn
|
|
||||||
applog.uc.cn
|
|
||||||
applog.zijieapi.com
|
|
||||||
ata-sdk-uuid-report.dreport.meituan.net
|
|
||||||
audid-api.taobao.com
|
|
||||||
audid.umeng.com
|
|
||||||
azr.footprintdns.com
|
|
||||||
b1-data.ads.heytapmobi.com
|
|
||||||
bdapi-ads.realmemobile.com
|
|
||||||
bdapi-in-ads.realmemobile.com
|
|
||||||
bdapi.ads.oppomobile.com
|
|
||||||
beacon-api.aliyuncs.com
|
|
||||||
beacon.qq.com
|
|
||||||
beacons.gvt2.com
|
|
||||||
beizi.biz
|
|
||||||
bingads.microsoft.com
|
|
||||||
books-analytics-events.apple.com
|
|
||||||
bugly.qq.com
|
|
||||||
business-api.tiktok.com
|
|
||||||
c.evidon.com
|
|
||||||
c.gj.qq.com
|
|
||||||
c.kuaiduizuoye.com
|
|
||||||
c.sayhi.360.cn
|
|
||||||
c2.gdt.qq.com
|
|
||||||
catalog.fjwhcbsh.com
|
|
||||||
ccs.umeng.com
|
|
||||||
cdn-ads.oss-cn-shanghai.aliyuncs.com
|
|
||||||
cdn.ad.xiaomi.com
|
|
||||||
cdn.ynuf.aliapp.org
|
|
||||||
cfg.imtt.qq.com
|
|
||||||
chat1.jd.com
|
|
||||||
chc.ads.huan.tv
|
|
||||||
ck.ads.oppomobile.com
|
|
||||||
clog.miguvideo.com
|
|
||||||
cm.bilibili.com
|
|
||||||
cn-acs.m.cainiao.com
|
|
||||||
cnzz.com
|
|
||||||
collect.kugou.com
|
|
||||||
contentcenter-drcn.dbankcdn.cn
|
|
||||||
crashlytics.com
|
|
||||||
crashlyticsreports-pa.googleapis.com
|
|
||||||
csjplatform.com
|
|
||||||
data.ads.oppomobile.com
|
|
||||||
data.mistat.india.xiaomi.com
|
|
||||||
data.mistat.rus.xiaomi.com
|
|
||||||
data.mistat.xiaomi.com
|
|
||||||
dataflow.biliapi.com
|
|
||||||
dc.sigmob.cn
|
|
||||||
diagnosis.ad.xiaomi.com
|
|
||||||
dig.bdurl.net
|
|
||||||
dl.zuimeitianqi.com
|
|
||||||
dlogs.bwton.com
|
|
||||||
dm.toutiao.com
|
|
||||||
doubleclick-cn.net
|
|
||||||
doubleclick.net
|
|
||||||
download.changhong.upgrade2.huan.tv
|
|
||||||
downloadxml.changhong.upgrade2.huan.tv
|
|
||||||
drcn-weather.cloud.huawei.com
|
|
||||||
dsp.fcbox.com
|
|
||||||
dualstack-logs.amap.com
|
|
||||||
dutils.com
|
|
||||||
dxp.baidu.com
|
|
||||||
e.ad.xiaomi.com
|
|
||||||
eclick.baidu.com
|
|
||||||
ef-dongfeng.tanx.com
|
|
||||||
entry.baidu.com
|
|
||||||
errlog.umeng.com
|
|
||||||
errnewlog.umeng.com
|
|
||||||
event.tradplusad.com
|
|
||||||
events-drcn.op.dbankcloud.cn
|
|
||||||
firebaselogging-pa.googleapis.com
|
|
||||||
flurry.com
|
|
||||||
g-staic.ganjingworld.com
|
|
||||||
g-staic.ganjingworld.com
|
|
||||||
g2.ganjing.world
|
|
||||||
game.loveota.com
|
|
||||||
gdfp.gifshow.com
|
|
||||||
gemini.yahoo.com
|
|
||||||
globalapi.ad.xiaomi.com
|
|
||||||
google-analytics.com
|
|
||||||
googleadservices-cn.com
|
|
||||||
googleadservices.com
|
|
||||||
googletagservices-cn.com
|
|
||||||
googletagservices.com
|
|
||||||
gromore.pangolin-sdk-toutiao.com
|
|
||||||
grs.dbankcloud.com
|
|
||||||
grs.hicloud.com
|
|
||||||
h-adashx.ut.taobao.com
|
|
||||||
h.trace.qq.com
|
|
||||||
henzanapp.com
|
|
||||||
hexagon-analytics.com
|
|
||||||
hiboard-drcn.ai.dbankcloud.cn
|
|
||||||
hm.baidu.com
|
|
||||||
hmma.baidu.com
|
|
||||||
httpdns.bcelive.com
|
|
||||||
httpdns.huaweicloud.com
|
|
||||||
httpdns.ocloud.oppomobile.com
|
|
||||||
httpdns.push.oppomobile.com
|
|
||||||
hugelog.fcbox.com
|
|
||||||
hw-ot-ad.a.yximgs.com
|
|
||||||
hw.zuimeitianqi.com
|
|
||||||
hwpub-s01-drcn.cloud.dbankcloud.cn
|
|
||||||
hya.comp.360os.com
|
|
||||||
hye.comp.360os.com
|
|
||||||
hyt.comp.360os.com
|
|
||||||
i.snssdk.com
|
|
||||||
iad.apple.com
|
|
||||||
iadctest.qwapi.com
|
|
||||||
iadsdk.apple.com
|
|
||||||
iadworkbench.apple.com
|
|
||||||
ib.snssdk.com
|
|
||||||
ifs.tanx.com
|
|
||||||
image-ad.sm.cn
|
|
||||||
imageplus.baidu.com
|
|
||||||
images.pinduoduo.com
|
|
||||||
img-c.heytapimage.com
|
|
||||||
img.adnyg.com
|
|
||||||
img.adnyg.com.w.kunlungr.com
|
|
||||||
imtmp.net
|
|
||||||
irc.qubiankeji.com
|
|
||||||
is.snssdk.com
|
|
||||||
ixav-cse.avlyun.com
|
|
||||||
iyfbodn.com
|
|
||||||
janapi.jd.com
|
|
||||||
jfapi.chiq-cloud.com
|
|
||||||
jiguang.cn
|
|
||||||
jpush.cn
|
|
||||||
jpush.html5.qq.com
|
|
||||||
jpush.io
|
|
||||||
jswebcollects.kugou.com
|
|
||||||
ks.pull.yximgs.com
|
|
||||||
lf1-cdn-tos.bytegoofy.com
|
|
||||||
lf3-ad-union-sdk.pglstatp-toutiao.com
|
|
||||||
liveats-vod.video.ptqy.gitv.tv
|
|
||||||
lm10111.jtrincc.cn
|
|
||||||
log-api-mn.huxiu.com
|
|
||||||
log-api.huxiu.com
|
|
||||||
log-api.pangolin-sdk-toutiao-b.com
|
|
||||||
log-api.pangolin-sdk-toutiao.com
|
|
||||||
log-sdk.gifshow.com
|
|
||||||
log-upload-os.hoyoverse.com
|
|
||||||
log-upload.mihoyo.com
|
|
||||||
log.ad.xiaomi.com
|
|
||||||
log.aispeech.com
|
|
||||||
log.avlyun.com
|
|
||||||
log.avlyun.sec.intl.miui.com
|
|
||||||
log.byteoversea.com
|
|
||||||
log.fc.yahoo.com
|
|
||||||
log.kuwo.cn
|
|
||||||
log.snssdk.com
|
|
||||||
log.stat.kugou.com
|
|
||||||
log.stat.kugou.com
|
|
||||||
log.tagtic.cn
|
|
||||||
log.tbs.qq.com
|
|
||||||
log.vcgame.cn
|
|
||||||
log.web.kugou.com
|
|
||||||
log.web.kugou.com
|
|
||||||
log.zijieapi.com
|
|
||||||
log1.cmpassport.com
|
|
||||||
logbak.hicloud.com
|
|
||||||
logs.amap.com
|
|
||||||
logservice.hicloud.com
|
|
||||||
logservice1.hicloud.com
|
|
||||||
logtj.kugou.com
|
|
||||||
logupdate.avlyun.sec.miui.com
|
|
||||||
m.kubiqq.com
|
|
||||||
m1.ad.10010.com
|
|
||||||
masdkv6.3g.qq.com
|
|
||||||
mdp-usertrace-cn.heytapmobi.com
|
|
||||||
metok.sys.miui.com
|
|
||||||
metrics.apple.com
|
|
||||||
metrics.data.hicloud.com
|
|
||||||
metrics.icloud.com
|
|
||||||
metrics.mzstatic.com
|
|
||||||
metrics2.data.hicloud.com
|
|
||||||
mi.gdt.qq.com
|
|
||||||
miav-cse.avlyun.com
|
|
||||||
miui-fxcse.avlyun.com
|
|
||||||
mnqlog.ldmnq.com
|
|
||||||
mobads-logs.baidu.com
|
|
||||||
mobads-pre-config.cdn.bcebos.com
|
|
||||||
mobads.baidu.com
|
|
||||||
mobilelog.upqzfile.com
|
|
||||||
mobileservice.cn
|
|
||||||
mon.zijieapi.com
|
|
||||||
monitor.music.qq.com
|
|
||||||
monitor.uu.qq.com
|
|
||||||
monsetting.toutiao.com
|
|
||||||
mssdk.volces.com
|
|
||||||
mssdk.zijieapi.com
|
|
||||||
mtj.baidu.com
|
|
||||||
nmetrics.samsung.com
|
|
||||||
notes-analytics-events.apple.com
|
|
||||||
nsclick.baidu.com
|
|
||||||
o2o.api.xiaomi.com
|
|
||||||
oauth-login-drcn.platform.dbankcloud.com
|
|
||||||
offerwall.yandex.net
|
|
||||||
open.e.kuaishou.cn
|
|
||||||
open.e.kuaishou.com
|
|
||||||
open.kuaishouzt.com
|
|
||||||
open.kwaishouzt.com
|
|
||||||
open.kwaizt.com
|
|
||||||
optimus-ads.amap.com
|
|
||||||
oth.eve.mdt.qq.com
|
|
||||||
oth.str.mdt.qq.com
|
|
||||||
p.l.qq.com
|
|
||||||
p.s.360.cn
|
|
||||||
p1-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
p1-lm.adkwai.com
|
|
||||||
p2-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
p2-lm.adkwai.com
|
|
||||||
p3-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
p3-lm.adkwai.com
|
|
||||||
p3-tt.byteimg.com
|
|
||||||
p4-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
p5-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
p6-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
pagead2.googleadservices.com
|
|
||||||
pagead2.googlesyndication.com
|
|
||||||
pangolin-sdk-toutiao-b.com
|
|
||||||
pgdt.ugdtimg.com
|
|
||||||
pglstatp-toutiao.com
|
|
||||||
pig.pupuapi.com
|
|
||||||
policy.video.ptqy.gitv.tv
|
|
||||||
proxy.advp.apple.com
|
|
||||||
public.gdtimg.com
|
|
||||||
q.i.gdt.qq.com
|
|
||||||
qqdata.ab.qq.com
|
|
||||||
qwapi.apple.com
|
|
||||||
qzs.gdtimg.com
|
|
||||||
recommend-drcn.hms.dbankcloud.cn
|
|
||||||
res.hubcloud.com.cn
|
|
||||||
res1.hubcloud.com.cn
|
|
||||||
res2.hubcloud.com.cn
|
|
||||||
res3.hubcloud.com.cn
|
|
||||||
review.gdtimg.com
|
|
||||||
rms-drcn.platform.dbankcloud.cn
|
|
||||||
roi.soulapp.cn
|
|
||||||
rpt.gdt.qq.com
|
|
||||||
rtb.voiceads.cn
|
|
||||||
s1.qq.com
|
|
||||||
s2.qq.com
|
|
||||||
s3.qq.com
|
|
||||||
samsung-com.112.2o7.net
|
|
||||||
samsungads.com
|
|
||||||
saveu5-normal-lq.zijieapi.com
|
|
||||||
scdown.qq.com
|
|
||||||
sdk-cache.video.ptqy.gitv.tv
|
|
||||||
sdk.beizi.biz
|
|
||||||
sdk.e.qq.com
|
|
||||||
sdkconf.avlyun.com
|
|
||||||
sdkconfig.ad.intl.xiaomi.com
|
|
||||||
sdkconfig.ad.xiaomi.com
|
|
||||||
sdkconfig.video.qq.com
|
|
||||||
sdkoptedge.chinanetcenter.com
|
|
||||||
sdktmp.hubcloud.com.cn
|
|
||||||
sdownload.stargame.com
|
|
||||||
search.ixigua.com
|
|
||||||
search3-search.ixigua.com
|
|
||||||
search5-search-hl.ixigua.com
|
|
||||||
search5-search.ixigua.com
|
|
||||||
securemetrics.apple.com
|
|
||||||
sensors-log.dongqiudi.com
|
|
||||||
service.changhong.upgrade2.huan.tv
|
|
||||||
service.vmos.cn/vmospro/api/ad
|
|
||||||
sf16-static.i18n-pglstatp.com
|
|
||||||
skdisplay.jd.com
|
|
||||||
slb-p2p.vcloud.ks-live.com
|
|
||||||
smartad.10010.com
|
|
||||||
smetrics.samsung.com
|
|
||||||
sms.ads.oppomobile.com
|
|
||||||
sngmta.qq.com
|
|
||||||
stat.y.qq.com
|
|
||||||
static.ads-twitter.com
|
|
||||||
staticsns.cdn.bcebos.com
|
|
||||||
stats.qiumibao.com
|
|
||||||
statsigapi.net
|
|
||||||
stg-data.ads.heytapmobi.com
|
|
||||||
storage.moegirl.org.cn
|
|
||||||
success.ctobsnssdk.com
|
|
||||||
syh-imp.cdnjtzy.com
|
|
||||||
t-dsp.pinduoduo.com
|
|
||||||
t.l.qq.com
|
|
||||||
t.track.ad.xiaomi.com
|
|
||||||
t1.a.market.xiaomi.com
|
|
||||||
t2.a.market.xiaomi.com
|
|
||||||
t3.a.market.xiaomi.com
|
|
||||||
tangram.e.qq.com
|
|
||||||
tdc.qq.com
|
|
||||||
tdid.m.qq.com
|
|
||||||
terms-drcn.platform.dbankcloud.cn
|
|
||||||
test.ad.xiaomi.com
|
|
||||||
test.e.ad.xiaomi.com
|
|
||||||
tj.b.qq.com
|
|
||||||
tj.video.qq.com
|
|
||||||
tmead.y.qq.com
|
|
||||||
tmfsdk.m.qq.com
|
|
||||||
tnc3-aliec1.toutiaoapi.com
|
|
||||||
tnc3-aliec2.bytedance.com
|
|
||||||
tnc3-aliec2.toutiaoapi.com
|
|
||||||
tnc3-alisc1.bytedance.com
|
|
||||||
tnc3-bjlgy.bytedance.com
|
|
||||||
tnc3-bjlgy.toutiaoapi.com
|
|
||||||
toblog.ctobsnssdk.com
|
|
||||||
trace.qq.com
|
|
||||||
track.lc.quark.cn
|
|
||||||
track.uc.cn
|
|
||||||
tracker.ai.xiaomi.com
|
|
||||||
tracker.gitee.com
|
|
||||||
tracking.miui.com
|
|
||||||
tracking.rus.miui.com
|
|
||||||
tvuser-ch.cedock.com
|
|
||||||
tx-ad.a.yximgs.com
|
|
||||||
tx-kmpaudio.pull.yximgs.com
|
|
||||||
tz.sec.xiaomi.com
|
|
||||||
uapi.ads.heytapmobi.com
|
|
||||||
uapi.chiq-cloud.com
|
|
||||||
ucstat.baidu.com
|
|
||||||
ulog-sdk.gifshow.com
|
|
||||||
ulogjs.gifshow.com
|
|
||||||
ulogs.umeng.com
|
|
||||||
ulogs.umengcloud.com
|
|
||||||
umengacs.m.taobao.com
|
|
||||||
umengjmacs.m.taobao.com
|
|
||||||
umsns.com
|
|
||||||
union.baidu.com
|
|
||||||
update.avlyun.sec.miui.com
|
|
||||||
us.l.qq.com
|
|
||||||
v.adintl.cn
|
|
||||||
v.adx.hubcloud.com.cn
|
|
||||||
v1-ad.video.yximgs.com
|
|
||||||
v2-ad.video.yximgs.com
|
|
||||||
v2.gdt.qq.com
|
|
||||||
v3-ad.video.yximgs.com
|
|
||||||
video-dsp.pddpic.com
|
|
||||||
vlive.qqvideo.tc.qq.com
|
|
||||||
vungle.com
|
|
||||||
w.l.qq.com
|
|
||||||
w1.askwai.com
|
|
||||||
w1.bskwai.com
|
|
||||||
w1.cskwai.com
|
|
||||||
w1.dskwai.com
|
|
||||||
w1.eskwai.com
|
|
||||||
w1.fskwai.com
|
|
||||||
w1.gskwai.com
|
|
||||||
w1.hskwai.com
|
|
||||||
w1.iskwai.com
|
|
||||||
w1.jskwai.com
|
|
||||||
w1.kskwai.com
|
|
||||||
w1.lskwai.com
|
|
||||||
w1.mskwai.com
|
|
||||||
w1.nskwai.com
|
|
||||||
w1.oskwai.com
|
|
||||||
w1.pskwai.com
|
|
||||||
w1.qskwai.com
|
|
||||||
w1.rskwai.com
|
|
||||||
w1.sskwai.com
|
|
||||||
w1.tskwai.com
|
|
||||||
w1.uskwai.com
|
|
||||||
w1.vskwai.com
|
|
||||||
w1.wskwai.com
|
|
||||||
w1.xskwai.com
|
|
||||||
w1.yskwai.com
|
|
||||||
w1.zskwai.com
|
|
||||||
weather-analytics-events.apple.com
|
|
||||||
weather-community-drcn.weather.dbankcloud.cn
|
|
||||||
weather-drcn.music.dbankcloud.cn
|
|
||||||
webstat.qiumibao.com
|
|
||||||
win.gdt.qq.com
|
|
||||||
wn.x.jd.com
|
|
||||||
ws-keyboard.shouji.sogou.com
|
|
||||||
ws.sj.qq.com
|
|
||||||
www42.zskwai.com
|
|
||||||
wxa.wxs.qq.com
|
|
||||||
wxsnsdy.wxs.qq.com
|
|
||||||
wxsnsdythumb.wxs.qq.com
|
|
||||||
xc.gdt.qq.com
|
|
||||||
xlivrdr.com
|
|
||||||
xlmzc.cnjp-exp.com
|
|
||||||
xlog.jd.com
|
|
||||||
xlviiirdr.com
|
|
||||||
xlviirdr.com
|
|
||||||
youxi.kugou.com
|
|
||||||
zeus.ad.xiaomi.com
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
*-ad-*.byteimg.com
|
|
||||||
*-ad.sm.cn
|
|
||||||
*-ad.wtzw.com
|
|
||||||
*.log.aliyuncs.com
|
|
||||||
*-normal-lq.zijieapi.com
|
|
||||||
*.data.hicloud.com
|
|
||||||
**-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
*-ad-sign.byteimg.com
|
|
||||||
*-be-pack-sign.pglstatp-toutiao.com
|
|
||||||
i*.snssdk.com
|
|
||||||
*-lm.adkwai.com
|
|
||||||
*.a.market.xiaomi.com
|
|
||||||
*-ad.video.yximgs.com
|
|
||||||
*-ad.video.yximgs.com
|
|
||||||
*.*skwai.com
|
|
||||||
*.*skwai.com
|
|
||||||
*.zskwai.com
|
|
||||||
ads*-normal-*.zijieapi.com
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f"{line.strip()}"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
|
|
||||||
def format_regex(regex_file):
|
|
||||||
regex = []
|
|
||||||
|
|
||||||
with open(regex_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
regex_lines = f"{line.strip()}"
|
|
||||||
regex.append(regex_lines)
|
|
||||||
return regex
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
Adclose_list = format_domain(domain_file) + format_regex(regex_file)
|
|
||||||
return Adclose_list
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f"||{line.strip()}^"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
|
|
||||||
def format_regex(regex_file):
|
|
||||||
regex = []
|
|
||||||
|
|
||||||
with open(regex_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
regex_lines = f"/{line.strip()}/".replace("\.","\\\.").replace("\*","\.\*")
|
|
||||||
regex.append(regex_lines)
|
|
||||||
return regex
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
Adguard_list = format_domain(domain_file) + format_regex(regex_file)
|
|
||||||
return Adguard_list
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f" - '{line.strip()}'"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
def format_regex(regex_file):
|
|
||||||
regex = []
|
|
||||||
|
|
||||||
with open(regex_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
regex_lines = f" - '{line.strip()}'".replace("$","").replace("^","")
|
|
||||||
regex.append(regex_lines)
|
|
||||||
return regex
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
clash_list = ["payload:"] + format_domain(domain_file) + format_regex(regex_file)
|
|
||||||
return clash_list
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f"DOMAIN,{line.strip()},reject"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
def format_regex(regex_file):
|
|
||||||
regex = []
|
|
||||||
|
|
||||||
with open(regex_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
regex_lines = f"DOMAIN-KEYWORD,{line.strip()},reject".replace("$","").replace("^","").replace("*","")
|
|
||||||
regex.append(regex_lines)
|
|
||||||
return regex
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
return format_domain(domain_file) + format_regex(regex_file)
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
## 插件开发文档
|
|
||||||
|
|
||||||
插件入口函数为`build()`
|
|
||||||
|
|
||||||
参考[Clash.py](./Clash.py)
|
|
||||||
|
|
||||||
插件返回的list格式参考下面的模板
|
|
||||||
|
|
||||||
`Adguard.py`:
|
|
||||||
|
|
||||||
```python
|
|
||||||
["||xxx.com^","||xxx.cc^"]
|
|
||||||
```
|
|
||||||
> 后缀名以及注释符请在build.json中添加 如果不存在则不执行此插件
|
|
||||||
|
|
||||||
提供的变量:
|
|
||||||
|
|
||||||
|
|
||||||
## domain_file
|
|
||||||
> 获取 rule目录的 domain.txt 路径
|
|
||||||
|
|
||||||
## regex_file
|
|
||||||
>获取 rule目录的 domain_regex.txt 路径
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
import json
|
|
||||||
|
|
||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f"{line.strip()}"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
def format_suffix(domain_file):
|
|
||||||
suffix = []
|
|
||||||
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
suffix_lines = f".{line.strip()}"
|
|
||||||
suffix.append(suffix_lines)
|
|
||||||
return suffix
|
|
||||||
|
|
||||||
def format_regex(regex_file):
|
|
||||||
regex = []
|
|
||||||
|
|
||||||
with open(regex_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
regex_lines = f"{line.strip()}"
|
|
||||||
regex.append(regex_lines)
|
|
||||||
return regex
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
domain_list = format_domain(domain_file)
|
|
||||||
domain_regex_list = format_regex(regex_file)
|
|
||||||
domain_suffix_list = format_suffix(domain_file)
|
|
||||||
rule = {
|
|
||||||
"version": 1,
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"domain": domain_list,
|
|
||||||
"domain_regex": domain_regex_list,
|
|
||||||
"domain_suffix": domain_suffix_list
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
json_data = json.dumps(rule, indent=2)
|
|
||||||
return [json_data]
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
import json
|
|
||||||
|
|
||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f"{line.strip()}"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
def format_suffix(domain_file):
|
|
||||||
suffix = []
|
|
||||||
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
suffix_lines = f".{line.strip()}"
|
|
||||||
suffix.append(suffix_lines)
|
|
||||||
return suffix
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
domain_list = format_domain(domain_file)
|
|
||||||
domain_suffix_list = format_suffix(domain_file)
|
|
||||||
rule = {
|
|
||||||
"version": 1,
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"domain": domain_list,
|
|
||||||
"domain_regex": [],
|
|
||||||
"domain_suffix": domain_suffix_list
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
json_data = json.dumps(rule, indent=2)
|
|
||||||
return [json_data]
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
def format_domain(domain_file):
|
|
||||||
domain = []
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f".{line.strip()}"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
surge_list = format_domain(domain_file)
|
|
||||||
return surge_list
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
import json
|
|
||||||
|
|
||||||
def format_domain(domain_file):
|
|
||||||
domain = ["127.0.0.1 localhost", "::1 localhost", "", ""]
|
|
||||||
with open(domain_file, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
|
|
||||||
for line in lines:
|
|
||||||
domain_lines = f"127.0.0.1 {line.strip()}"
|
|
||||||
domain.append(domain_lines)
|
|
||||||
return domain
|
|
||||||
|
|
||||||
|
|
||||||
def build(domain_file, regex_file):
|
|
||||||
return format_domain(domain_file)
|
|
||||||
Loading…
Reference in New Issue
Block a user