mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 01:30:37 +08:00
Feat: reject supports $all syntax
This commit is contained in:
parent
7ba16b0a55
commit
631b2806cf
@ -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}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user