浏览代码

Feat: reject supports $all syntax

SukkaW 3 年之前
父节点
当前提交
631b2806cf
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 7 1
      Build/lib/parse-filter.js
  2. 1 0
      List/domainset/reject_sukka.conf

+ 7 - 1
Build/lib/parse-filter.js

@@ -120,9 +120,15 @@ async function processFilterRules(filterRulesUrl) {
       && (
         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)) {
         blacklistDomainSets.add(`.${domain}`);
       }

+ 1 - 0
List/domainset/reject_sukka.conf

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