Feat: include DOMAIN-WILDCARD in AdGuardHome output

This commit is contained in:
SukkaW
2024-10-25 02:16:02 +08:00
parent 7d182e3fdb
commit ec0ce55487
2 changed files with 15 additions and 22 deletions

View File

@@ -114,6 +114,15 @@ export class DomainsetOutput extends RuleOutput<Preprocessed> {
}
}
for (const wildcard of this.domainWildcard) {
const processed = wildcard.replaceAll('?', '*');
if (processed.startsWith('*.')) {
results.push(`||${processed.slice(2)}^`);
} else {
results.push(`|${processed}^`);
}
}
return results;
}
}