Update CDN & Reject Hosts, Reject IPs

This commit is contained in:
SukkaW
2025-01-26 12:12:12 +08:00
parent 32e27a579b
commit deb0169846
5 changed files with 59 additions and 19 deletions

View File

@@ -123,6 +123,18 @@ export abstract class RuleOutput<TPreprocessed = unknown> {
return this;
}
addIPASN(asn: string) {
this.ipasn.add(asn);
return this;
}
bulkAddIPASN(asns: string[]) {
for (let i = 0, len = asns.length; i < len; i++) {
this.ipasn.add(asns[i]);
}
return this;
}
private async addFromDomainsetPromise(source: AsyncIterable<string> | Iterable<string> | string[]) {
for await (const line of source) {
if (line[0] === '.') {