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

View File

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

View File

@ -20,6 +20,37 @@ optimus-ads.amap.com
.taio.app .taio.app
.headcaptcha.live .headcaptcha.live
.coinzilla.io .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 # fake pirate bay
.thepiratebay3.com .thepiratebay3.com
# malware / scam # malware / scam
@ -661,6 +692,7 @@ analytics.slashdotmedia.com
.bkrtx.com .bkrtx.com
.ads.pro-market.net .ads.pro-market.net
.stat.xtom.com .stat.xtom.com
.stat.cat.net
.analytics.archive.org .analytics.archive.org
.stats.yinyuetai.com .stats.yinyuetai.com
.collect.yinyuetai.com .collect.yinyuetai.com
@ -672,7 +704,8 @@ analytics.infomaniak.com
p.cloudcraft.co p.cloudcraft.co
collect.foresightnews.pro collect.foresightnews.pro
stats.snipaste.com stats.snipaste.com
.plausible.cyberciti. .plausible.cyberciti.com
umami.rss3.io
.adjust.io .adjust.io
.airbrake.io .airbrake.io
@ -835,6 +868,8 @@ bingads.microsoft.com
.googletraveladservices.com .googletraveladservices.com
# >> Huawei # >> Huawei
.nebula-collector.huawei.com
.data.hicloud.com .data.hicloud.com
logservice.hicloud.com logservice.hicloud.com
logservice1.hicloud.com logservice1.hicloud.com
@ -1091,6 +1126,7 @@ videopush.baidu.com
.tracker.baidu.com .tracker.baidu.com
.tuijian.baidu.com .tuijian.baidu.com
.ubmcmm.baidustatic.com .ubmcmm.baidustatic.com
.cbjs.baidustatic.com
# >> Qihoo 360 # >> Qihoo 360
.stat.360safe.com .stat.360safe.com
@ -1661,6 +1697,7 @@ log.ycapp.yiche.com
thirdparty.biliapi.com thirdparty.biliapi.com
thirdparty.biliapi.net thirdparty.biliapi.net
cm.bilibili.com cm.bilibili.com
.data.bilibili.com
# >> CNTV # >> CNTV
galaxy.bjcathay.com galaxy.bjcathay.com