Update Domestic & Global & CDN & Reject Hosts

This commit is contained in:
SukkaW
2024-04-03 22:28:05 +08:00
parent 7df6255727
commit f1b4d6724b
8 changed files with 108 additions and 25 deletions

View File

@@ -18,7 +18,20 @@ export const parseDomesticList = async () => {
const top5000 = new Set<string>();
const res = await (await fetch('https://radar.cloudflare.com/charts/LargerTopDomainsTable/attachment?id=1077&top=10000')).text();
const res = await (await fetch('https://radar.cloudflare.com/charts/LargerTopDomainsTable/attachment?id=1077&top=10000', {
headers: {
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'accept-language': 'en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.6,es;q=0.5',
'sec-ch-ua': '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'none',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1'
}
})).text();
const stream = parse(res);
for await (const [domain] of stream) {
if (trie.has(domain)) {