Fix: reject whitelist

This commit is contained in:
SukkaW
2024-09-22 00:59:08 +08:00
parent 16767b6564
commit 65d78b3915
2 changed files with 13 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ export abstract class RuleOutput {
static jsonToLines = (json: unknown): string[] => stringify(json).split('\n');
whitelistDomain = (domain: string) => {
this.domainTrie.whitelist(domain);
return this;
};
static domainWildCardToRegex = (domain: string) => {
let result = '^';
for (let i = 0, len = domain.length; i < len; i++) {