mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Fetch remote whitelist from AdGuardDNSFilters
This commit is contained in:
parent
ea8d4f7210
commit
fda2618447
@ -61,6 +61,21 @@ const filterRuleWhitelistDomainSets = new Set(PREDEFINED_WHITELIST);
|
||||
});
|
||||
}));
|
||||
|
||||
await Promise.all([
|
||||
'https://raw.githubusercontent.com/AdguardTeam/AdGuardSDNSFilter/master/Filters/exceptions.txt',
|
||||
'https://raw.githubusercontent.com/AdguardTeam/AdGuardSDNSFilter/master/Filters/exclusions.txt'
|
||||
].map(
|
||||
input => processFilterRules(input).then((i) => {
|
||||
if (i) {
|
||||
const { white, black } = i;
|
||||
white.forEach(i => filterRuleWhitelistDomainSets.add(i));
|
||||
black.forEach(i => filterRuleWhitelistDomainSets.add(i));
|
||||
} else {
|
||||
process.exit(1);
|
||||
}
|
||||
})
|
||||
));
|
||||
|
||||
console.timeEnd('* Download and process AdBlock Filter Rules');
|
||||
|
||||
if (shouldStop) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user