Update CDN & Reject Hosts

This commit is contained in:
SukkaW 2024-02-06 14:25:03 +08:00
parent 880715f196
commit aca48afb6d
3 changed files with 47 additions and 11 deletions

View File

@ -22,10 +22,14 @@ const deepTrieNodeToJSON = (node: TrieNode) => {
return obj;
};
function trieNodeInspectCustom(this: TrieNode) {
return JSON.stringify(deepTrieNodeToJSON(this), null, 2);
}
const createNode = (): TrieNode => {
const node = new Map<string, TrieNode>() as TrieNode;
node[SENTINEL] = false;
node[Bun.inspect.custom] = () => JSON.stringify(deepTrieNodeToJSON(node), null, 2);
node[Bun.inspect.custom] = trieNodeInspectCustom;
return node;
};
@ -70,9 +74,7 @@ export const createTrie = (from?: string[] | Set<string> | null) => {
token = suffix[i];
node = node.get(token);
if (!node) {
return false;
}
if (!node) return false;
}
return true;
@ -88,9 +90,7 @@ export const createTrie = (from?: string[] | Set<string> | null) => {
token = inputSuffix[i];
node = node.get(token);
if (!node) {
return [];
}
if (!node) return [];
}
const matches: string[] = [];
@ -130,9 +130,7 @@ export const createTrie = (from?: string[] | Set<string> | null) => {
token = inputSuffix[i];
node = node.get(token);
if (!node) {
return;
}
if (!node) return;
}
// Performing DFS from prefix

View File

@ -2379,3 +2379,4 @@ redircdn.com
images7.design-editor.com
images8.design-editor.com
images.design-editor.com
assets.st-note.com

View File

@ -20,6 +20,37 @@ optimus-ads.amap.com
.taio.app
.headcaptcha.live
.coinzilla.io
.p2perrorlog.douyucdn.cn
.114la.com
.365key.com
.51.la
.adnyg.com
.baifendian.com
.crazyegg.com
.demdex.net
.donews.com
.duomai.com
.growingio.com
.kuaizhan.com
.lapin365.com
.miaozhen.com
.omtrdc.net
.pv.com.cn
.scorecardresearch.com
.sensorsdata.cn
.stargame.com
.taboola.com.cn
.taboola.com
.tagtic.cn
.testin.cn
.tiqcdn.cn
.tiqcdn.com
.ugdtimg.com
.woopra.com
.xlingdi.com
.zampdsp.com
.zhugeio.com
.telemetry.coder.com
# fake pirate bay
.thepiratebay3.com
# malware / scam
@ -661,6 +692,7 @@ analytics.slashdotmedia.com
.bkrtx.com
.ads.pro-market.net
.stat.xtom.com
.stat.cat.net
.analytics.archive.org
.stats.yinyuetai.com
.collect.yinyuetai.com
@ -672,7 +704,8 @@ analytics.infomaniak.com
p.cloudcraft.co
collect.foresightnews.pro
stats.snipaste.com
.plausible.cyberciti.
.plausible.cyberciti.com
umami.rss3.io
.adjust.io
.airbrake.io
@ -835,6 +868,8 @@ bingads.microsoft.com
.googletraveladservices.com
# >> Huawei
.nebula-collector.huawei.com
.data.hicloud.com
logservice.hicloud.com
logservice1.hicloud.com
@ -1091,6 +1126,7 @@ videopush.baidu.com
.tracker.baidu.com
.tuijian.baidu.com
.ubmcmm.baidustatic.com
.cbjs.baidustatic.com
# >> Qihoo 360
.stat.360safe.com
@ -1661,6 +1697,7 @@ log.ycapp.yiche.com
thirdparty.biliapi.com
thirdparty.biliapi.net
cm.bilibili.com
.data.bilibili.com
# >> CNTV
galaxy.bjcathay.com