Feat: reject supports $all syntax

This commit is contained in:
SukkaW 2022-04-22 05:49:10 +08:00
parent 7ba16b0a55
commit 631b2806cf
2 changed files with 8 additions and 1 deletions

View File

@ -120,9 +120,15 @@ async function processFilterRules(filterRulesUrl) {
&& ( && (
line.endsWith('^') line.endsWith('^')
|| line.endsWith('^|') || line.endsWith('^|')
|| line.endsWith('^$all')
) )
) { ) {
const domain = `${line.replaceAll('||', '').replaceAll('^|', '').replaceAll('^', '')}`.trim(); const domain = line
.replaceAll('||', '')
.replaceAll('^|', '')
.replaceAll('^$all', '')
.replaceAll('^', '')
.trim();
if (rDomain.test(domain)) { if (rDomain.test(domain)) {
blacklistDomainSets.add(`.${domain}`); blacklistDomainSets.add(`.${domain}`);
} }

View File

@ -12,6 +12,7 @@ optimus-ads.amap.com
.2144.cn .2144.cn
.laomaotao.net .laomaotao.net
.weddingeeos.com .weddingeeos.com
.rjno1.com
# >> Qihoo 360 # >> Qihoo 360
hot.m.shouji.360tpcdn.com hot.m.shouji.360tpcdn.com