Compare commits

...

38 Commits

Author SHA1 Message Date
Loyalsoldier
d8bd29ce92 Fix: incorrect lowercase for regexp rules (#3066) 2025-12-17 00:17:43 +08:00
Loyalsoldier
72eb885658 Refine: extract rule type (#3065) 2025-12-17 00:10:33 +08:00
风扇滑翔翼
93bfcfd142 Feat: check regexp before build (#3064)
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2025-12-16 23:40:25 +08:00
DeepChirp
cbe19f0562 picacg-ads: split from picacg 2025-12-16 21:42:59 +08:00
DeepChirp
ea99bef4a2 google-ads: comment out problematic rule 2025-12-16 21:42:59 +08:00
深鸣
9b01521761 ctyun: add new entry (#3059) 2025-12-16 21:24:37 +08:00
深鸣
8d50851b58 umeng-ads: add more domains (#3060) 2025-12-16 21:13:11 +08:00
sklimoff
16923730a4 Add wink and include it in category-ru (#3058) 2025-12-16 21:06:32 +08:00
Luo Chen
7e3137a0d1 Fix #3055 (#3056) 2025-12-16 09:54:53 +08:00
tooadstool
6b4c09860b Add Ookla Speedtest Central to the list (#3053)
* Add Ookla Speedtest Central to the list

* Update ookla-speedtest

---------

Co-authored-by: rootmelo92118 <32770959+rootmelo92118@users.noreply.github.com>
2025-12-15 22:40:47 +08:00
Jiew-KueJwiaeng
6a11042b92 Update 18comic & picacg (#2695)
* Update 18comic

* Update picacg

* Update 18comic

---------

Co-authored-by: rootmelo92118 <32770959+rootmelo92118@users.noreply.github.com>
2025-12-15 22:38:15 +08:00
dependabot[bot]
5a2d4ca56a Chore: bump actions/upload-artifact from 5 to 6 (#3051)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 12:54:55 +08:00
深鸣
22997b1833 category-education-cn: add neea.cn (#3050)
[skip ci]
2025-12-14 23:38:53 +08:00
Nomad Chen
182647ca79 category-ai-!cn: add kiro.dev (#3048) 2025-12-13 17:35:46 +08:00
深鸣
c40fdf359e Add more ad domains (#3047)
* Add more ad domains

* Rename msn-ads to microsoft-ads

---------

Co-authored-by: MkQtS <81752398+MkQtS@users.noreply.github.com>
2025-12-13 15:20:31 +08:00
深鸣
bc788dad86 Add some game-related domains (#3045)
ref: <https://zh.wikipedia.org/wiki/WikiProject:%E7%94%B5%E5%AD%90%E6%B8%B8%E6%88%8F/%E6%9D%A5%E6%BA%90%E8%80%83%E9%87%8F>

Co-authored-by: MkQtS <81752398+MkQtS@users.noreply.github.com>
2025-12-12 19:21:05 +08:00
深鸣
eea5617a98 baishancloud: add new entry (#3046) 2025-12-12 18:15:31 +08:00
深鸣
da968c3baa geolocation-cn: add gov.cn (#3044)
* geolocation-cn: add miit.gov.cn

* geolocation-cn: add gov.cn

---------

Co-authored-by: MkQtS <81752398+MkQtS@users.noreply.github.com>
2025-12-12 15:05:37 +08:00
Aethersailor
b53e38de3f Update category-game-platforms-download (#3042) 2025-12-12 14:21:19 +08:00
MkQtS
3253563d96 Add duck.ai (#3043)
* duckduckgo: add duck.ai

* category-ai-!cn: add duck.ai
2025-12-12 11:52:53 +08:00
深鸣
47bda31505 qihoo360-ads: add fenxi.360.cn (#3039) 2025-12-11 23:49:06 +08:00
深鸣
2c525b6e37 Add github-ads (#3040) 2025-12-11 23:25:26 +08:00
xchacha20-poly1305
dd57604969 netease: add yunxinfw.com (#3041) 2025-12-11 23:24:15 +08:00
jinqiang zhang
b228d4e657 update tiktok (#3037) 2025-12-11 17:36:54 +08:00
flyinthe-sky
e28d022394 Add category-tm (#2796)
Turkmenistan
2025-12-11 17:30:54 +08:00
yueisme
fcac0353c1 category-games-!cn: add nexus-cdn.com (#3036)
nexusmods cdn
2025-12-11 17:22:39 +08:00
MkQtS
128f37d4d3 Add more cn domains (#3035)
* category-electronic-cn: add cxmt.com

* category-entertainment-cn: add baofeng domains

* category-media-cn: add more domains

* geolocation-cn: reorder and add chuangcache.com
2025-12-11 14:38:38 +08:00
深鸣
de544779aa geolocation-cn: add cc-pay.cn (#3034) 2025-12-11 13:34:26 +08:00
深鸣
088ab962ab akamai: add tl88.net (#3033) 2025-12-11 12:08:20 +08:00
深鸣
98ffe9b37f geolocation-cn: add jiashule.com (#3032) 2025-12-11 09:52:56 +08:00
深鸣
390bea7c2d qcloud: add tdnsstic1.cn (#3031) 2025-12-11 09:50:04 +08:00
深鸣
0bdcb310e7 aliyun: add aligfwaf.com (#3030) 2025-12-11 09:49:12 +08:00
∀thrun
eea552b1d6 Add projectpoi (#3028)
* project poi: new group

* category-porn: include projectpoi
2025-12-10 23:44:32 +08:00
深鸣
a1207cbb18 wps: add qwps.cn (#3029) 2025-12-10 23:42:36 +08:00
深鸣
8b4e5e1578 tencent-ads: add new domain (#3027)
refer:
* AdguardTeam/AdguardFilters#209009
* AdguardTeam/AdguardFilters#89990
* easylist/easylist#8580
2025-12-10 23:41:27 +08:00
MkQtS
92a9ec71ff Add more cn domains (#3026)
* bytedance: add more domains

* geolocation-cn: reorder
2025-12-09 14:33:43 +08:00
MkQtS
0a03682f8d category-entertainment: add qobuz.com (#3025) 2025-12-09 12:51:35 +08:00
MkQtS
d694dfd5d8 Add more cn domains (#3024)
* update hanyi

add hanyi.com, merge hellofont

* update qihoo360

add baomitu.com, remove dead 75team

* geolocation-cn: reorder and add more domains
2025-12-09 12:48:15 +08:00
56 changed files with 674 additions and 231 deletions

View File

@@ -34,7 +34,7 @@ jobs:
mv dlc.dat TEST-${{ github.run_number }}-dlc.dat
- name: Upload TEST-${{ github.run_number }}-dlc.dat
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: TEST-${{ github.run_number }}-dlc.dat
path: TEST-${{ github.run_number }}-dlc.dat

View File

@@ -5,11 +5,47 @@
18comic.company
18comic.org
18comic.vip
asjmapihost.cc
cdnblackmyth.club
cdnmhws.cc
cdnmhwscc.vip
cdnuc.vip
cdnxxx-proxy.co
cdnxxx-proxy.xyz
jm-comic2.cc
jm18c-bbm.cc
jm18c-bbm.net
jm18c-uoi.net
jm365.work
jm365.xyz
jmapibranch1.cc
jmapibranch2.cc
jmapibranch3.cc
jmapinode.biz
jmapinode.vip
jmapinode.xyz
jmapinode1.top
jmapinode2.top
jmapinode3.top
jmapinodeudzn.net
jmapinodeudzn.xyz
jmapiproxy1.cc
jmapiproxy1.monster
jmapiproxy2.cc
jmapiproxy3.cc
jmapiproxy4.cc
jmapiproxyxxx.vip
jmcomic.group
jmcomic.ltd
jmcomic.me
jmcomic.mobi
jmcomic.moe
jmcomic.rocks
jmcomic-fb.vip
jmcomic-zzz.one
jmcomic-zzz.org
jmcomic1.city
jmcomic1.me
jmcomic1.mobi
jmcomic1.rocks
jmcomic2.moe

View File

@@ -1,5 +0,0 @@
75.team
75team.com
# 75CDN
baomitu.com

1
data/9game Normal file
View File

@@ -0,0 +1 @@
9game.cn

View File

@@ -78,3 +78,4 @@ janrainservices.com @cn
skycdn.com.cn @cn
soasta-dswb.com
srtcdn.net
tl88.net @cn

View File

@@ -10,6 +10,7 @@ taobao
# All .tmall domains
tmall
include:9game
include:alibaba-ads
include:alibabacloud
include:aliyun
@@ -25,7 +26,6 @@ include:youku
25pp.com
56che.com
95095.com
9game.cn
ali-health.com
aliapp.org
alibaba-inc.com

View File

@@ -1,3 +1,4 @@
include:amap-ads
include:youku-ads
a.alimama.cn @ads
@@ -10,7 +11,6 @@ adash.man.aliyuncs.com @ads
adashbc.m.taobao.com @ads
adashbc.ut.taobao.com @ads
adashx.m.taobao.com @ads
adashx.ut.amap.com @ads
adashx.ut.ele.me @ads
adashx4ae.ut.taobao.com @ads
adashx4yt.m.taobao.com @ads
@@ -38,7 +38,6 @@ retcode.taobao.com @ads
tce.alicdn.com @ads
tns.simba.taobao.com @ads
track.lc.quark.cn @ads
v6-adashx.ut.amap.com @ads
v6-adashx.ut.cainiao.com @ads
v6-adashx.ut.ele.me @ads
v6-adashx.ut.taobao.com @ads

View File

@@ -3,6 +3,7 @@ alicdn.com
alicloudapi.com
alidayu.com
alidns.com
aligfwaf.com
alikunlun.com
alikunlun.net
aliyun-inc.com

View File

@@ -1,3 +1,5 @@
include:amap-ads
a-map.cn
a-map.co
a-map.link

5
data/amap-ads Normal file
View File

@@ -0,0 +1,5 @@
adashx.ut.amap.com @ads
dualstack-logs.amap.com @ads
logs.amap.com @ads
optimus-ads.amap.com @ads
v6-adashx.ut.amap.com @ads

3
data/baishancloud Normal file
View File

@@ -0,0 +1,3 @@
bsclink.cn
qingcdn.com
trpcdn.net

View File

@@ -86,7 +86,6 @@ bytedance.com
bytedance.net
bytedance.org
bytedanceapi.com
bytedapm.com
bytedcdn.com
bytedeliver.com
bytedgames.com
@@ -335,6 +334,12 @@ ppxstatic.com
ppxvod.com
xiaoxiaapi.com
# 上海格物致品
douyinec.com
ecombdapi.com
ecombdstatic.com
jinritemai.com
# faceu
faceu.com

View File

@@ -23,3 +23,4 @@ pglstatp-snssdk-toutiao.com @ads
pglstatp-toutiao-b.com @ads
pglstatp-toutiao.com @ads
sf3-ttcdn-tos.pstatp.com @ads
shoppingads.cn @ads

View File

@@ -17,6 +17,7 @@ include:dmm-ads
include:duolingo-ads
include:emogi-ads
include:flurry-ads
include:github-ads
include:google-ads
include:growingio-ads
include:hiido-ads
@@ -29,6 +30,7 @@ include:kuaishou-ads
include:kugou-ads
include:letv-ads
include:meta-ads
include:microsoft-ads
include:mopub-ads
include:mxplayer-ads
include:netease-ads
@@ -36,6 +38,7 @@ include:newrelic-ads
include:ogury-ads
include:ookla-speedtest-ads
include:openx-ads
include:picacg-ads
include:pocoiq-ads
include:pubmatic-ads
include:qihoo360-ads
@@ -56,7 +59,7 @@ include:xhamster-ads
include:xiaomi-ads
include:ximalaya-ads
include:yahoo-ads
include:youku-ads
include:zhihu-ads
# Other domains for ads serving
51.la

View File

@@ -29,7 +29,9 @@ copilot.microsoft.com
devin.ai
diabrowser.com
dify.ai
duck.ai
gateway.ai.cloudflare.com
kiro.dev
meta.ai
mistral.ai
openart.ai

View File

@@ -53,6 +53,11 @@ qgzb.net
zbbm.gov.cn
zbbm.net
# 中国考试教育网
# 京ICP备05064772号
neea.cn
# neea.edu.cn
# 云校
91yunxiao.com
# 爱云校/好分数

View File

@@ -13,6 +13,9 @@ boe.com.cn
# 博流智能
bouffalolab.com
# 长鑫存储
cxmt.com
# 乐鑫信息科技
esp8266.cn
esp8266.com

View File

@@ -83,6 +83,7 @@ egta.com
fireside.fm
internationalsaimoe.com
joox.com
kpacg.com
linetv.tw
megaphone.fm
mikanani.me
@@ -91,6 +92,7 @@ odysee.com
omobi.cc
oranum.com
overcast.fm
qobuz.com
syosetu.com
weverse.io
yande.re
@@ -99,3 +101,71 @@ yande.re
amp-api.podcast.apple.com
bag.itunes.apple.com
bookeeper.itunes.apple.com
# Entertainment oriented media
## 4Gamer.net
4gamer.net
## 4Gamers
4gamers.com.tw
## 秋葉原綜研
akiba-souken.com
## Appget
appget.com
## AppMedia
appmedia.jp
## Automaton
automaton-media.com
## 电faminicogamer
denfaminicogamer.jp
## ASCII Media Works
dengekionline.com
## E-ROAD
eroge-road.com
## ファミ通
famitsu.com
## 遊戲基地
gamebase.com.tw
## gamebiz
gamebiz.jp
## IID, Inc.
gamebusiness.jp
gamespark.jp
inside-games.jp
## GameMeca
gamemeca.com
## Gameover有機網
gameover.com.hk
## Gamer
gamer.ne.jp
onlinegamer.jp
## Great Game
greatgame.asia
## HobbiGame
hobbigame.com
## IGN
ign.com
ignimg.com
## Made with Unity
madewithunity.jp
## Media Clip
mediaclip.jp
## 電脳世界のひみつ基地
maedahiroyuki.com
## MANTANWEB
mantan-web.jp
## Moepedia
moepedia.net
## QooApp
qoo-app.com
## Real Sound
realsound.jp
## Saiga NAK
saiganak.com
## The Games Daily
tgdaily.co.kr
## Thisisgame
thisisgame.com
## Wanuxi
wanuxi.com
## よろず〜
yorozoonews.jp

View File

@@ -44,21 +44,17 @@ ldmnq.com
lsplayer.com
yeshen.com
# https://github.com/supzhang/epg
# 鲁ICP备18015570号-1
51zmt.top
# B站空降助手 鲁ICP备2024098956号-1
bsbsb.top
# 17K小说
17k.com
# 3DM游戏网
3dmgame.com
# 游侠网
ali213.net
# https://github.com/supzhang/epg
51zmt.top
# 暴风影音
baofeng.com
baofeng.net
# 布咕阅读
bgwxc.com
# B站空降助手
bsbsb.top
# 动漫之家 #703
dmzj.com
muwai.com
@@ -109,3 +105,47 @@ zhanqi.tv
zhulang.com
# 纵横小说
zongheng.com
# 娱乐资讯媒体
include:tgbus
include:vgtime
## 17173网
17173.com
## 18183网
18183.com
## 3DM游戏网
3dmgame.com
## 游侠网
ali213.net
## 竞核
cgames.com
## 触乐
chuapp.com
## DataEye
dataeye.com
## GameDiary
gamediary.cn
## GameLook
gamelook.com.cn
## GameRes游资网
gameres.com
## 游戏价值论
gamewower.com
## 机核
gcores.com
## IGN中国
ign.com.cn
## 手游那点事
nadianshi.com
## 游戏日报
news.yxrb.net
## 游戏机实用技术
ucg.cn
## 游戏茶馆
youxichaguan.com
## 游戏葡萄
youxiputao.com
## 游研社
yystv.cn

View File

@@ -3,7 +3,7 @@ full:download.cdp.bethesda.net
full:content.cdp.bethesda.net
# Roti - 游戏更新/下载
full:gamedownloads-rockstargames-com.akamaized.net
full:lion.secure.dyn.riotcdn.net
full:lol.secure.dyn.riotcdn.net
full:ks-foundation.secure.dyn.riotcdn.net
full:riot-client.secure.dyn.riotcdn.net
@@ -64,6 +64,7 @@ full:blzdist-wow.necdn.leihuo.netease.com @cn
full:blzdist-hs.necdn.leihuo.netease.com @cn
full:blzdist-di.necdn.leihuo.netease.com @cn
full:blzdist-ow.necdn.leihuo.netease.com @cn
full:blzdist-d3.necdn.leihuo.netease.com @cn
# GOG - 客户端更新/游戏下载[Akamai]
full:gog-cdn.akamaized.net
@@ -93,12 +94,19 @@ full:uplaypc-s-ubisoft.cdn.ubi.com
full:uplaypc-s-ubisoft-ww.cdn.ubi.com
full:ubisoftconnect.cdn.ubi.com
# Ubisoft Connect(Uplay) - 游戏下载(中国大陆地区)
# Ubisoft Connect(Uplay) - 游戏下载-腾讯云(中国大陆地区)
full:ubisoftconnect.eo-edgefunctions7.com @cn
full:uplaypc-s-ubisoft.cdn.ubionline.com.cn @cn
# Ubisoft Connect(Uplay) - 游戏下载-AkamaiCN(中国大陆地区)
full:uplaypc-s-ubisoft.cdn.ubionline.com.cn @cn
# EA Desktop - 游戏下载[akamai-CDN]
full:origin-a.akamaihd.net
# EA Desktop - 游戏下载[Cloudflare-CDN]
full:prod.cloudflare.cdn.ea.com
# Steam - 游戏下载(中国区)[新流云]
full:dl.steam.clngaa.com @cn

View File

@@ -47,6 +47,7 @@ humblebundle.com
joinsquad.com
loverslab.com
minecraft.wiki
nexus-cdn.com
nexusmods.com
offworldindustries.com
offworldindustries.net

View File

@@ -1,4 +1,5 @@
include:4399
include:9game
include:bilibili-game
include:bluepoch-games
include:cowlevel
@@ -6,13 +7,13 @@ include:herogame
include:kurogames
include:mihoyo-cn
include:tencent-games
include:tgbus
include:tiancity
include:vgtime
include:vrzwk
include:xd
include:yokaverse
# 北京奇客创想科技有限公司
7k7k.com
# 刀锋盒子 皖B2-20190103-4
9xgame.com
# 《异象回声》游戏官网 沪ICP备2023010411号-1

View File

@@ -1,3 +1,4 @@
# Entertainment(games) oriented media should be added in category-entertainment[-cn]
include:category-tech-media
include:6park
@@ -90,10 +91,12 @@ chinaeconomicreview.com
cmmedia.com.tw
cna.com.tw
cnyes.com
cool3c.com
coolloud.org.tw
cup.com.hk
cw.com.tw
d100.net
donga.com
ebc.net.tw
ettoday.net
eventsinfocus.org
@@ -101,6 +104,7 @@ factwire.org
fortuneinsight.com
freebeacon.com
gbnews.uk
getnews.jp
hk01.com
hkcitizenmedia.com
hkcnews.com
@@ -109,11 +113,13 @@ hkgpao.com
hongkongfp.com
inmediahk.net
inside.com.tw
itmedia.co.jp
jfengtime.com
landofhope.tv
limedia.tw
localpresshk.com
ltsports.com.tw
macaodaily.com
mdnkids.com
mirrormedia.com.tw
mirrormedia.mg
@@ -157,6 +163,7 @@ upmedia.mg
vjmedia.com.hk
warroom.org
washingtonpost.com
watch.impress.co.jp
wealth.com.tw
weiyuksj.com
wenzhao.ca

View File

@@ -48,6 +48,8 @@ cqnews.net
cqsjb.com
# 中证网
cs.com.cn
# 创业邦
cyzone.cn
# 浙江广播电视集团/浙江卫视/新蓝网
cztv.com
cztvcdn.com
@@ -61,12 +63,13 @@ yundzh.com
dgtle.com
# DoNews
donews.com
# 大众日报
dzng.com
dzwww.com
# 超能网
expreview.com
# FreeBuf 网络安全行业门户
freebuf.com
# 机核
gcores.com
# 极客公园
geekpark.net
# 光明网
@@ -83,6 +86,8 @@ huanqiucdn.cn
# 虎嗅
huxiu.com
huxiucdn.com
# 电脑报
icpcw.com
# 中国IDC圈
idcquan.com
# 艾瑞咨询
@@ -91,6 +96,8 @@ iresearch.cn
jianyuweb.com
wallstcn.com
wallstreetcn.com
# 机器之心
jiqizhixin.com
# 金融界
jrj.com.cn
jrjimg.cn
@@ -108,6 +115,8 @@ kksmg.com
statickksmg.com
# 晚点
latepost.com
# 快科技
mydrivers.com
# 南岳新闻网
nanyuenews.com
# 每日经济新闻报社
@@ -128,10 +137,15 @@ people.com.cn
pingwest.com
# 量子位
qbitai.com
# 齐鲁壹点
qiluyidian.net
ql1d.com
# 青岛新闻
qingdaonews.com
# 前瞻网
qianzhan.com
# 四川手机报
scsjb.cn
# 安全内参
secrss.com
# 南方财经网
@@ -162,6 +176,8 @@ thsi.cn
ths123.com
# 人人都是产品经理
woshipm.com
# 新快报
xkb.com.cn
# 第一财经
yicai.com
# ZEALER

View File

@@ -51,6 +51,7 @@ include:picacg
include:playboy
include:pornhub
include:pornpros
include:projectpoi
include:sehuatang
include:shireyishunjian
include:smtiaojiaoshi

View File

@@ -23,5 +23,6 @@ include:mailru-group
include:okko
include:ozon
include:rutube
include:wink
include:x5
include:yandex

82
data/category-tm Normal file
View File

@@ -0,0 +1,82 @@
# Turkmenistan
tm
# Telecom
100haryt.com
altynachar.com
ashgabat.in
ashgabatmarket.com
bagdan.biz
bd-travel.com
bereketliatyz.biz
bilettm.com
burkut.biz
chozgut.com
cv-dent.com
dagetek.com
dempromotion.com
dunyabelli.com
gold-computers.com
harman.consulting
ilkinji.com
linkm.me
linkmessenger.me
ogt-turkmenistan.com
paknesil.com
sanly.pro
sumbar-computer.com
tehnikadunyasi.com
tolkuchka.bar
tpsadvertising.com
ulgamda.com
yeketak.com
yovshan.com
yukleapp.com
yupekchi.com
zamanturkmenistan.com
# Leased Line Customers
akyllytilsimat.com
alfarhatbarakaty.com
aryketek.com
atavatan-turkmenistan.com
atavatantv.com
aydym.com
belet.me
beletapis.com
gipertm.com
globustm.com
hasaphesip.com
imdatelektronika.com
makulhyzmat.com
makulsozluk.com
markayoly.com
markazona.com
nesipetsin.com
nesipetsin.info
nesiptextile.com
orient.tm
pikir.biz
shaylan.biz
tapgo.biz
tmcars.info
turkmen-tranzit.com
turkmenlawyer.com
turkmenportal.com
unite-gaming.com
ymbdoganlar.com
ynamly.biz
zerlitm.com
gapyr.ga
gozleg.com
horjun.online
tmstart.com
asmanexpress.com
jetcompany.ru
ynamdar.com
turkmenagro.com
ojar.asia

69
data/ctyun Normal file
View File

@@ -0,0 +1,69 @@
# 天翼云
# 京ICP备2021034386号
ctadns.cn
bjctyiptv.cn
cqctyiptv.cn
ctacdn.cn
ctaigw.cn
ctbcdn.com
ctcdn.cn
ctcdn.com.cn
ctcdnov.net
ctcloudzos.cn
ctcns.cn
ctdcdn.com
ctdns.cn
ctdns.com.cn
ctdns.net
ctecdn.cn
ctecx.cn
ctgcdn.com
cthcdn.cn
cthcdn.com
cthcdn.net
ctlcdn.cn
ctlcdn.com
ctlcdn.net
ctmcdn.cn
ctovcdn.com
ctrender.com
ctwcdn.cn
ctxcdn.cn
ctxcdn.com
ctxcdn.net
ctxirang.cn
ctxirang.com
ctycdn.cn
ctycdn.net
ctycdn.net.cn
ctydoh.cn
ctyecx.cn
ctyiptv.cn
ctyun.cn
ctyun.com.cn
ctyuncdn.cn
ctyuncs.cn
ctyuninner.com
ctyunmds.cn
ctyunwaf.cn
ctyunwaf.com
ctyunwaf1.com
ctyunwaf3.cn
ctyunxs.cn
ctyunzos.cn
ctzcdn.cn
ctzcdn.com
edgecloudx.cn
faasapp.cn
faasdev.cn
fjctyiptv.cn
gdctyiptv.cn
gsctyiptv.cn
gsjtyiptv.cn
gzctyiptv.cn
jsctyiptv.cn
modelers.cn
scctyiptv.cn
snctyiptv.cn
ynctyiptv.cn
ynjtyiptv.cn

View File

@@ -7,6 +7,7 @@ ddh.gg
dgg.gg
dontbubble.us
donttrack.us
duck.ai
duck.co
duck.com
duckduckco.com

View File

@@ -31,6 +31,8 @@ include:typenetwork
include:typography
include:webtype
bunka.go.jp
# Automobile
include:bmw
include:bridgestone

View File

@@ -12,8 +12,6 @@ include:category-electronic-cn
include:category-entertainment-cn
# 餐饮类
include:category-food-cn
# Hospitals
include:category-hospital-cn
# 快递物流
include:category-logistics-cn
# Media & News & Press
@@ -34,36 +32,6 @@ include:category-httpdns-cn
# 号码认证
# include:category-number-verification-cn
# Aviation
include:airchina # 中国国际航空
include:hainanairlines # 海南航空
caac.gov.cn # 中国民航局
ceair.com # 中国东方航空
chinaexpressair.com # 华夏航空
csair.com # 中国南方航空
flycua.com # 中国联合航空
hbhk.com.cn # 河北航空
jdair.net # 首都航空
juneyaoair.com # 吉祥航空
luckyair.net # 祥鹏航空
sichuanair.com # 四川航空
tibetairlines.com.cn # 西藏航空
travelskymobile.cn # 信天游(航空电子客票验真)
variflight.com # 飞常准
xiamenair.com # 厦门航空
# 航旅纵横
umetrip.com
umetrip.com.cn
umetrip.net.cn
ume-trip.cn
# Railway
12306.cn
95306.cn
ccrgt.com
# Bank & Finance & Insurance & Securities
include:category-bank-cn
include:category-securities-cn
@@ -72,12 +40,21 @@ include:everbright
include:pingan
include:taikang
hsqh.net # 徽商期货有限责任公司
## 航财通·校园付
cc-pay.cn
## 徽商期货有限责任公司
hsqh.net
## 上海陆金所
lu.com
lufax.com
lufaxcdn.com
# CDN or SDWAN
include:aws-cn
include:baishancloud
include:bootcdn
include:cloudflare-cn
include:ctyun
include:dwion
include:maocloud
include:qingcloud
@@ -88,28 +65,38 @@ include:upai
include:wangsu
include:yunfanjiasu
# 百家云
## 百家云
baijiayun.com
# 明源云
## 创世云
chuangcache.com
chuangcdn.com
## 123 云盘 CDN
cjjd19.com
## 明源云
fdcyun.com
mingyuanyun.com
mypaas.com
mypaas.com.cn
myypark.com
# 开普云
## FUNCDN
funcdn.com
## 北京知道创宇信息技术股份有限公司
jiashule.com
jiasule.com
yunaq.com
## 即刻雾联(北京)
## https://github.com/v2fly/domain-list-community/pull/1352#issuecomment-1345476790
jikeiot.cloud
## 开普云
kaipuyun.cn
kaipuyun.com
kaipuyun.com.cn
kaipuyun.net
# 江西节点技术服务有限公司
## 北龙中网
knet.cn
## 江西节点技术服务有限公司
pkoplink.com
funcdn.com
knet.cn # 北龙中网
# E-commerce
include:58tongcheng
include:ctrip
@@ -129,26 +116,41 @@ include:vancl
include:youzan
include:ziroom
# 多点新鲜
dmall.com
dmallcdn.com
# 孔夫子旧书网
kongfz.com
kfzimg.com
# 朴朴
pupuapi.com
pupumall.com
# 穷游
qyer.com
qyerstatic.com
# 唯品会
## 无忧易售
51selling.com
## 唯品会
appsimg.com
appvipshop.com
vip.com
vipstatic.com
# 慢慢买
## 多点新鲜
dmall.com
dmallcdn.com
## 微店
geilicdn.com
weidian.com
## 聚美优品
jmstatic.com
jumei.com
## 孔夫子旧书网
kongfz.com
kfzimg.com
## 慢慢买
manmanbuy.com
# 瞎买
## 美物清单
maxonesoft.com
meiwulist.com
## OZONBIGSELL分析产品系统
ozonbigsell.com
## 朴朴
pupuapi.com
pupumall.com
## 穷游
qyer.com
qyerstatic.com
## Ru-seer 俄罗斯卖家助手
ruseer.com
## 瞎买
xiamai.net
# Forums
@@ -192,6 +194,57 @@ moyubuluo.com # 墨鱼部落格 鲁ICP备16022801号-9
upe.net # 优启通官网IT天空
winos.me # WINOS 精简社区
# Healthcare
include:category-hospital-cn
## 丁香园
biomart.cn
dxy.com
dxy.cn
dxycdn.com
## 江苏健康通
jsehealth.com
## 仁科医疗科技有限公司服务域名,为北大口腔和一些其他国内医院小程序提供服务
mingxuan.store
# Party and government offices & Public units
gov.cn
## 中国气象局
cma.cn
## 中央气象台
nmc.cn
# Public transportation
include:airchina # 中国国际航空
include:hainanairlines # 海南航空
# 中国民航局 caac.gov.cn
ceair.com # 中国东方航空
chinaexpressair.com # 华夏航空
csair.com # 中国南方航空
flycua.com # 中国联合航空
hbhk.com.cn # 河北航空
jdair.net # 首都航空
juneyaoair.com # 吉祥航空
luckyair.net # 祥鹏航空
sichuanair.com # 四川航空
tibetairlines.com.cn # 西藏航空
travelskymobile.cn # 信天游(航空电子客票验真)
variflight.com # 飞常准
xiamenair.com # 厦门航空
## Railway
12306.cn
95306.cn
ccrgt.com
## 跨境巴士
kuajing84.com
## 宁停车
ningtingche.com
## 航旅纵横
umetrip.com
umetrip.com.cn
umetrip.net.cn
ume-trip.cn
# Science & Technology & Knowledge & Scholar & Press & E-learning & Education
include:category-education-cn
include:category-olympiad-in-informatics
@@ -200,6 +253,24 @@ include:category-wiki-cn
include:guokr
include:ihuman
## 青春北京
### 共青团北京市委员会信息中心
include:bjyouth
### 知藏(北京)数据技术有限公司
zzdtec.com
## 青年大学习
### 北京中青在线网络信息技术有限公司
cyol.com
### 北京天润基业科技发展股份有限公司
webterren.com
## 国学大师网
guoxuedashi.com
guoxuemi.com
## 志愿汇
zyh365.com
## 温州市图书馆
wzlib.cn
# Services & Softwares
include:category-ai-cn
include:category-collaborate-cn
@@ -245,12 +316,18 @@ include:zdns
include:zhangtao
include:zhubajie
## 容联七陌 客服 营销
7moor-fs1.com
7moor.com
## 安兔兔
antutu.com
## 拓竹科技
bambulab.com
bblmw.com
## BOSS 直聘
bosszhipin.com
zhipin.com
# 当贝
## 当贝
dangbei.com
dangbei.net
## 酷控
@@ -270,6 +347,16 @@ i8tq.com
tq121.com.cn
weather.com.cn
weatherdt.com
## 掌阅
ireader.com
zhangyue.com
zhangyue01.com
zhangyuecdn.com
## 小能智慧云客服
ntalker.com
## 心知天气
sencdn.com
seniverse.com
## 重庆阅品科技
tianqi.com
tianqistatic.com
@@ -277,6 +364,11 @@ tianqistatic.com
foundertype.com
## 仟寻招聘
moseeker.com
## OneDNS 微步在线
onedns.net
## 智齿客服
sobot.com
soboten.com
## TaCool SSL 酷证书
tacool.com
## Via 浏览器
@@ -327,46 +419,46 @@ include:zte
51togic.com # 泰捷WEBOX
avlyun.com # 安天移动安全
hisensehitachi.com # 海信日立官网
jamcz.com # 晨钟网络科技
roborock.com # 石头科技
socpk.com # 极客湾移动芯片排行
suzuki-china.com # 铃木中国官网
udesk.cn # 沃丰科技
# 稿定(厦门)信息服务有限公司
## 花瓣网 闽ICP备2021013850号
huaban.com
huabanimg.com
## 闽ICP备12002004号
dancf.com
hlgdata.com
huanleguang.com
ttxsapp.com.cn
xsbapp.cn
# Telecommunication
include:chinabroadnet
include:chinamobile
include:chinatelecom
include:chinatower
include:chinaunicom
# 中国铁塔
include:chinatower
# 在线工具
itdog.cn # itdog网站工具箱
webmasterhome.cn # 站长之家
# 在线工具书
guoxuedashi.com
guoxuemi.com
# IPIP ip地理位置数据库
include:ipip
# ip138查询网
ip138.com
ipshudi.com
include:ipip # IPIP ip地理位置数据库
chaziyu.com # 滇ICP备2024035496号
fofa.info # Fofa网站测绘华顺信安
icplishi.com # 粤ICP备20009057号
ip138.com # ip138查询网
ipchaxun.com # 滇ICP备2024035496号
ipchaxun.net # 粤ICP备20009057号
rdnsdb.com # 闽ICP备15009794号
ipplus360.com # 豫ICP备17017462号-1 埃文科技
ipshu.com # 鄂B2-20110095-1
fofa.info # Fofa网站测绘华顺信安
onedns.net # OneDNS微步在线
ipshudi.com # IP属地查询
itdog.cn # itdog网站工具箱
rdnsdb.com # 闽ICP备15009794号
webmasterhome.cn # 站长之家
# 主页导航
## 氪主页
@@ -398,32 +490,6 @@ include:sinopec
chugou360.com
ycrx360.com
# 即刻雾联(北京)
# Refer: https://github.com/v2fly/domain-list-community/pull/1352#issuecomment-1345476790
jikeiot.cloud
zyh365.com # 志愿汇
# 中国气象局政府门户网站
cma.gov.cn
# 中国气象局
cma.cn
# 中央气象台
nmc.cn
# 青年大学习
## 北京中青在线网络信息技术有限公司 (京ICP备16062000号)
cyol.com
## 北京天润基业科技发展股份有限公司 (京ICP备19052875号-1)
webterren.com
# 青春北京
## 共青团北京市委员会信息中心 (京ICP备14030447号-3)
include:bjyouth
## 知藏(北京)数据技术有限公司 (京ICP备19038827号)
zzdtec.com
# The following domains are carried over from geosite:cn.
# TODO: Decide how to deal with these domains
@@ -445,12 +511,10 @@ zzdtec.com
1637.com
16888.com
16rd.com
17173.com
178linux.com
17989.com
17cdn.com
17house.com
18183.com
1905.com
19yxw.com
1nongjing.com
@@ -531,8 +595,6 @@ zzdtec.com
7230.com
72byte.com
7down.com
7k7k.com
7moor.com
7po.com
7x24cc.com
7xdown.com
@@ -593,7 +655,6 @@ baixing.com
baixing.net
bamenzhushou.com
bangongziyuan.com
baofeng.com
baoxianshichang.com
bearychat.com
beihaidc.com
@@ -663,7 +724,6 @@ chinaweiyu.com
chinawutong.com
chinazns.com
chouti.com
chuangcdn.com
chuangxin.com
chuansong.me
chuansongme.com
@@ -748,12 +808,10 @@ duomai.com
duoshuo.com
duote.com
dxpmedia.com
dxycdn.com
dyhjw.com
dzdvip.com
dzsc.com
dzw3.com
dzwww.com
easesale.com
easiu.com
eastday.com
@@ -799,7 +857,6 @@ gdjdxy.com
gdliontech.com
gdrc.com
geektool.top # 极客Tool 蜀ICP备2024086015号-2
geilicdn.com
gezida.com
gfan.com
giocdn.com
@@ -912,7 +969,6 @@ jianzhi8.com
jiaodong.net
jiaoyimao.com
jiasuhui.com
jiasule.com
jiathis.com
jiayuan.com
jiazhao.com
@@ -922,12 +978,10 @@ jinianbi.com
jinrongren.net
jinse.com
jinti.com
jiqizhixin.com
jisuxia.com
jiuzhilan.com
jj20.com
jkbl.com
jmstatic.com
job5588.com
job910.com
jobjm.com
@@ -935,7 +989,6 @@ jsrdgg.com
jsyks.com
juefeng.com
julive.com
jumei.com
juwan.com
juxia.com
jyimg.com
@@ -1000,9 +1053,6 @@ longre.com
longzhu.com
lotpc.com
loupan.com
lu.com
lufax.com
lufaxcdn.com
lunwengo.net
luyouqi.com
lvmama.com
@@ -1050,7 +1100,6 @@ mumayi.com
muomou.com
muzhiwan.com
mydown.com
mydrivers.com
myshow360.net
myyx618.com
myzaker.com
@@ -1063,7 +1112,6 @@ newyx.net
noknok.cn
nowscore.com
nruan.com
ntalker.com
nvsheng.com
nx-sc.com
nxog.top # 湘ICP备2022006601号-1
@@ -1142,8 +1190,6 @@ scdng.com
scoregg.com
sczsxx.com
sdo.com
sencdn.com
seniverse.com
senlinjimore.com # 鲁ICP备20001333号 森林集
sgamer.com
shang360.com
@@ -1179,7 +1225,6 @@ skimit.net
skycn.com
sllssrq.com
snimay.com
sobot.com
sofreight.com
softwhy.com
sojson.com
@@ -1270,7 +1315,6 @@ wdzj.com
weand.com
weavatar.com
weicaifu.com
weidian.com
weilaicaijing.com
weiphone.net
weixing.com
@@ -1386,7 +1430,6 @@ yrz.name
yslyhr.com
ysten.com
yuanzhiyijiantong.com
yunaq.com
yunba.io
yundun.com
yunkanpan.com # 京ICP备15036006号-3
@@ -1446,28 +1489,9 @@ vzuu.com
zoom3g.com
zoomyou.cn
# 沪ICP备2021017807号-4
ecombdapi.com
# 稿定(厦门)信息服务有限公司
## 花瓣网 闽ICP备2021013850号
huaban.com
huabanimg.com
## 闽ICP备12002004号
dancf.com
hlgdata.com
huanleguang.com
ttxsapp.com.cn
xsbapp.cn
# 酷家乐 杭州群核信息技术有限公司 浙ICP备12022366号-6
kujiale.com
# 海信日立官网
hisensehitachi.com
# 铃木中国官网
suzuki-china.com
# 建始网 鄂ICP备05004864号-1
jsw118.com
@@ -1485,9 +1509,6 @@ educoder.net
tokcoder.com
trustie.net
# 温州市图书馆 浙ICP备11032910号-3
wzlib.cn
# 浙江御鹿电子科技有限公司 麦瑞克健身设备 & 超燃脂APP 浙ICP备2021003090号-2
merach.com
@@ -1495,23 +1516,9 @@ merach.com
taichuan.com
taichuan.net
# 江苏健康通
jsehealth.com
# 拓竹科技
bambulab.com
bblmw.com
# 中国石油支付宝小程序
95504test.com
# 123 云盘 CDN
cjjd19.com
# 美物清单
maxonesoft.com
meiwulist.com
# 北京鸿合智能系统股份有限公司
hitevision-solutions.com
@@ -1521,12 +1528,6 @@ jslife.net
# 南海控股有限公司
nanhaicorp.com
# 跨境巴士 粤ICP备18102556号
kuajing84.com
# ozonbigsell 闽ICP备2023012501号-1
ozonbigsell.com
# 深圳市金易桥科技有限公司 粤ICP备2023069807号
ozonabc.com
@@ -1534,12 +1535,6 @@ ozonabc.com
qingping.co
cleargrass.com
# 无忧易售 粤ICP备18054020号
51selling.com
# Ru-seer 俄罗斯卖家助手 粤ICP备2023020424号
ruseer.com
# 布丁猫(岩池科技)
# 黑ICP备2024018807号
bdmozon.com
@@ -1548,12 +1543,6 @@ bdmyandex.com
bdcat.top
puddingcat.top
# 宁停车
ningtingche.com
# 仁科医疗科技有限公司服务域名,为北大口腔和一些其他国内医院小程序提供服务
mingxuan.store
# 海南东勤网络科技有限公司 琼ICP备18003843号
qunliao.info

View File

@@ -1,3 +1,4 @@
include:github-ads
include:npmjs
atom.io

2
data/github-ads Normal file
View File

@@ -0,0 +1,2 @@
collector.github.com @ads
copilot-telemetry.githubusercontent.com @ads

View File

@@ -49,6 +49,7 @@ partnerad.l.google.com @ads
urchin.com @ads
full:analytics.google.com @ads
full:fundingchoicesmessages.google.com @ads
# https://github.com/AdguardTeam/FiltersRegistry/pull/1154
# full:fundingchoicesmessages.google.com @ads
regexp:^adservice\.google\.([a-z]{2}|com?)(\.[a-z]{2})?$ @ads

View File

@@ -1,6 +1,12 @@
include:hellofont
hanyi.com
hanyi.com.cn
# Font Star
fontstar.com.cn
# 字由HelloFont
hellofont.cn
hellowebfont.com
full:hellofontpreview.oss-cn-beijing.aliyuncs.com
full:hellowebfonts.oss-cn-beijing.aliyuncs.com

View File

@@ -1,5 +0,0 @@
hellofont.cn
hellowebfont.com
full:hellofontpreview.oss-cn-beijing.aliyuncs.com
full:hellowebfonts.oss-cn-beijing.aliyuncs.com

View File

@@ -1,6 +1,7 @@
include:azure
include:bing
include:github
include:microsoft-ads
include:microsoft-dev
include:microsoft-pki
include:msn
@@ -83,7 +84,6 @@ c-msedge.net
centralvalidation.com
ch9.ms
charticulator.com
clarity.ms @ads
cloudapp.net
cloudappsecurity.com
cortanaanalytics.com
@@ -147,7 +147,6 @@ microsoft-sbs-domains.com
microsoft-smb.cn @cn
microsoft365.com
microsoftaccountguard.com
microsoftads.com @ads
microsoftadvertising.com
microsoftadvertisingregionalawards.com
microsoftaffiliates.com
@@ -189,7 +188,6 @@ morphcharts.com
mpnevolution.com
ms-studiosmedia.com
ms365surfaceoffer.com
msads.net @ads
msauth.cn @cn
msauth.net
msauthimages.cn @cn
@@ -216,7 +214,6 @@ msra.cn @cn
msturing.org
msudalosti.com
mymicrosoft.com
nelreports.net @ads
nextechafrica.net
nxta.org
o365cn.com @cn

6
data/microsoft-ads Normal file
View File

@@ -0,0 +1,6 @@
browser.events.data.msn.cn @ads
browser.events.data.msn.com @ads
clarity.ms @ads
microsoftads.com @ads
msads.net @ads
nelreports.net @ads

View File

@@ -1,2 +1,4 @@
include:hoyoverse
include:mihoyo-cn
include:mihoyo-ads

2
data/mihoyo-ads Normal file
View File

@@ -0,0 +1,2 @@
log-upload-os.hoyoverse.com @ads
log-upload.mihoyo.com @ads

View File

@@ -33,4 +33,5 @@ static163.net
ydstatic.com
yeah.net
youdao.com
yunxinfw.com
zhuanzfx.com

View File

@@ -13,3 +13,6 @@ webtest.net
full:www.speedtest.net.cdn.cloudflare.net
include:ookla-speedtest-ads
# SpeedTest Node
ookla-speedtest-central.hgconair.hgc.com.hk # HGC Global Communications 香港環電

View File

@@ -1,3 +1,5 @@
include:picacg-ads
bikaa.xyz
bikac.xyz
bikaios.xyz
@@ -8,3 +10,7 @@ picacn.xyz
picacomic.com
picacomic.xyz
wikawika.xyz
# Image Resource Domain like `img.diwodiwo.xyz` `s3.diwodiwo.xyz` `storage.diwodiwo.xyz` `storage-b.diwodiwo.xyz`
diwodiwo.xyz

2
data/picacg-ads Normal file
View File

@@ -0,0 +1,2 @@
full:ad-channel.diwodiwo.xyz @ads
full:ad-display.diwodiwo.xyz @ads

4
data/projectpoi Normal file
View File

@@ -0,0 +1,4 @@
poi.icu
poi6.net
poihub.com
project-poi.com

View File

@@ -131,6 +131,7 @@ tcloudhw.com
tcloudhw.net
tcloudscdn.com
tcloudscdn.net
tdnsstic1.cn
tdnsx1.com
techo.chat
tefscloud.com

View File

@@ -1,4 +1,3 @@
include:75team
include:qihoo360-ads
include:starworld
@@ -31,6 +30,7 @@ include:starworld
360zqaq.com
anquanke.com
appjiagu.com
baomitu.com
dhsvc.cn
haoso.com
haosou.com

View File

@@ -1,3 +1,4 @@
fenxi.360.cn @ads
fenxi.com @ads
lianmeng.360.cn @ads
mediav.com @ads

View File

@@ -13,11 +13,13 @@ adslvfile.qq.com @ads
adslvseed.qq.com @ads
adsmind.apdcdn.tc.qq.com @ads
adsqqclick.qq.com @ads
adstats.tencentmusic.com @ads
adstestview.qq.com @ads
adsview.qq.com @ads
adsview2.qq.com @ads
adv.app.qq.com @ads
adver.qq.com @ads
badjs.weixinbridge.com @ads
beacon.cdn.qq.com @ads
beacon.qq.com @ads
beaconcdn.qq.com @ads
@@ -26,14 +28,17 @@ bugly.qq.com @ads
e.qq.com @ads
gdt.qq.com @ads
hq-tracking.qq.com @ads
htrace.wetvinfo.com @ads
isdspeed.qq.com @ads
log.tbs.qq.com @ads
mdt.qq.com @ads
monitor.music.qq.com @ads
mpush.qq.com @ads
mtrace.qq.com @ads
pgdt.gtimg.cn @ads
pingjs.qq.com @ads
push.qq.com @ads
report.qqweb.qq.com @ads
sngmta.qq.com @ads
stat.y.qq.com @ads
tajs.qq.com @ads

View File

@@ -1,7 +1,9 @@
bytedapm.com @!cn
byteoversea.com @!cn
muscdn.com @!cn
musical.ly @!cn
tik-tokapi.com @!cn
tiktok-minis.com @!cn
tiktok-row.net @!cn
tiktok.com @!cn
tiktokcdn-eu.com @!cn
@@ -23,3 +25,7 @@ ttoverseaus.net @!cn
ttwstatic.com @!cn
full:p16-tiktokcdn-com.akamaized.net @!cn
full:roovza-launches.appsflyersdk.com @!cn
full:roovza.inapps.appsflyersdk.com @!cn
full:roovza.launches.appsflyersdk.com @!cn
full:roovza.skadsdk.appsflyersdk.com @!cn

View File

@@ -1,5 +1,25 @@
aaid.umeng.com @ads
alog.umeng.com @ads
alog.umengcloud.com @ads
alogs.umeng.com @ads
alogus.umeng.com @ads
ar.umeng.com @ads
aspect-upush.umeng.com @ads
audid.umeng.com @ads
ccs.umeng.com @ads
cnlogs.umeng.com @ads
cnlogs.umengcloud.com @ads
# https://github.com/TG-Twilight/AWAvenue-Ads-Rule/issues/185
# errlog.umeng.com @ads
# errnewlog.umeng.com @ads
new-aaid.umeng.com @ads
new-aaid.umeng.com.gds.alibabadns.com @ads
oc.umeng.com @ads
plbslog.umeng.com @ads
resolve.umeng.com @ads
ulogs.umeng.com @ads
ulogs.umengcloud.com @ads
utoken.umeng.com @ads
# CNZZ
w.cnzz.com @ads

3
data/wink Normal file
View File

@@ -0,0 +1,3 @@
ngenix.net
restream-media.net
wink.ru

View File

@@ -2,6 +2,7 @@ wps.cn
wps.com
wpscdn.cn
wpscdn.com
qwps.cn
# Big Data Platform
kscord.com

View File

@@ -1,2 +1,4 @@
include:zhihu-ads
zhihu.com
zhimg.com

2
data/zhihu-ads Normal file
View File

@@ -0,0 +1,2 @@
crash2.zhihu.com @ads
zhihu-web-analytics.zhihu.com @ads

38
main.go
View File

@@ -7,6 +7,7 @@ import (
"fmt"
"os"
"path/filepath"
"regexp"
"sort"
"strconv"
"strings"
@@ -22,6 +23,14 @@ var (
exportLists = flag.String("exportlists", "", "Lists to be flattened and exported in plaintext format, separated by ',' comma")
)
const (
RuleTypeDomain string = "domain"
RuleTypeFullDomain string = "full"
RuleTypeKeyword string = "keyword"
RuleTypeRegexp string = "regexp"
RuleTypeInclude string = "include"
)
type Entry struct {
Type string
Value string
@@ -64,30 +73,39 @@ func (l *ParsedList) toProto() (*router.GeoSite, error) {
}
for _, entry := range l.Entry {
switch entry.Type {
case "domain":
case RuleTypeDomain:
site.Domain = append(site.Domain, &router.Domain{
Type: router.Domain_RootDomain,
Value: entry.Value,
Attribute: entry.Attrs,
})
case "regexp":
case RuleTypeRegexp:
// check regexp validity to avoid runtime error
_, err := regexp.Compile(entry.Value)
if err != nil {
return nil, fmt.Errorf("invalid regexp in list %s: %s", l.Name, entry.Value)
}
site.Domain = append(site.Domain, &router.Domain{
Type: router.Domain_Regex,
Value: entry.Value,
Attribute: entry.Attrs,
})
case "keyword":
case RuleTypeKeyword:
site.Domain = append(site.Domain, &router.Domain{
Type: router.Domain_Plain,
Value: entry.Value,
Attribute: entry.Attrs,
})
case "full":
case RuleTypeFullDomain:
site.Domain = append(site.Domain, &router.Domain{
Type: router.Domain_Full,
Value: entry.Value,
Attribute: entry.Attrs,
})
default:
return nil, errors.New("unknown domain type: " + entry.Type)
}
@@ -118,14 +136,20 @@ func removeComment(line string) string {
func parseDomain(domain string, entry *Entry) error {
kv := strings.Split(domain, ":")
if len(kv) == 1 {
entry.Type = "domain"
entry.Type = RuleTypeDomain
entry.Value = strings.ToLower(kv[0])
return nil
}
if len(kv) == 2 {
entry.Type = strings.ToLower(kv[0])
entry.Value = strings.ToLower(kv[1])
if strings.EqualFold(entry.Type, RuleTypeRegexp) {
entry.Value = kv[1]
} else {
entry.Value = strings.ToLower(kv[1])
}
return nil
}
@@ -255,7 +279,7 @@ func ParseList(list *List, ref map[string]*List) (*ParsedList, error) {
newEntryList := make([]Entry, 0, len(entryList))
hasInclude := false
for _, entry := range entryList {
if entry.Type == "include" {
if entry.Type == RuleTypeInclude {
refName := strings.ToUpper(entry.Value)
if entry.Attrs != nil {
for _, attr := range entry.Attrs {