Update Reject & Download Hosts

This commit is contained in:
SukkaW
2024-01-03 12:03:18 +08:00
parent 6ac8a09655
commit 250a436207
4 changed files with 16 additions and 7 deletions

View File

@@ -68,10 +68,10 @@ export const buildRejectDomainSet = task(import.meta.path, async () => {
purePhishingDomains.forEach(suffix => domainSets.add(`.${suffix}`));
}),
(async () => {
for await (const line of readFileByLine(path.resolve(import.meta.dir, '../Source/domainset/reject_sukka.conf'))) {
const l = processLine(line);
if (l) {
domainSets.add(l);
for await (const l of readFileByLine(path.resolve(import.meta.dir, '../Source/domainset/reject_sukka.conf'))) {
const line = processLine(l);
if (line) {
domainSets.add(line);
}
}
})()

View File

@@ -25,7 +25,7 @@ export function processDomainLists(domainListsUrl: string, includeAllSubDomain =
if (!domainToAdd) continue;
if (DEBUG_DOMAIN_TO_FIND && domainToAdd.includes(DEBUG_DOMAIN_TO_FIND)) {
console.warn(picocolors.red(domainListsUrl), '(black)', picocolors.bold(DEBUG_DOMAIN_TO_FIND));
console.warn(picocolors.red(domainListsUrl), '(black)', domainToAdd.replaceAll(DEBUG_DOMAIN_TO_FIND, picocolors.bold(DEBUG_DOMAIN_TO_FIND)));
foundDebugDomain = true;
}
@@ -61,7 +61,7 @@ export function processHosts(hostsUrl: string, includeAllSubDomain = false, skip
const _domain = domain.trim();
if (DEBUG_DOMAIN_TO_FIND && _domain.includes(DEBUG_DOMAIN_TO_FIND)) {
console.warn(picocolors.red(hostsUrl), '(black)', picocolors.bold(DEBUG_DOMAIN_TO_FIND));
console.warn(picocolors.red(hostsUrl), '(black)', _domain.replaceAll(DEBUG_DOMAIN_TO_FIND, picocolors.bold(DEBUG_DOMAIN_TO_FIND)));
foundDebugDomain = true;
}
@@ -131,7 +131,7 @@ export async function processFilterRules(
flag === ParseType.WhiteIncludeSubdomain || flag === ParseType.WhiteAbsolute
? '(white)'
: '(black)',
picocolors.bold(DEBUG_DOMAIN_TO_FIND)
hostname.replaceAll(DEBUG_DOMAIN_TO_FIND, picocolors.bold(DEBUG_DOMAIN_TO_FIND))
);
foundDebugDomain = true;
}