AdguardTeam / cname-trackers

This repository contains a list of popular CNAME trackers
https://adguard.com/
MIT License
387 stars 37 forks source link

Add duplicate and redundancy checking #97

Closed Alex-302 closed 7 months ago

Alex-302 commented 7 months ago

The size of some lists is greatly increased due to the presence of redundant rules. We need to check rules for redundancy and remove unnecessary ones.

For example:

||tracker.example.com^
||sub.domain.tracker.example.com^
||various.subdomains.tracker.example.com^

2, 3 are redundant.

and

||www.1016.lookinews.com^
||1016.lookinews.com^

The first is redundant.

Online tool https://abpvn.com/ruleChecker/redundantRuleChecker.html

Code of this tool domain_check.zip

ameshkov commented 7 months ago

The easiest way would be to use tsurlfilter here.

slavaleleka commented 7 months ago

is it redundant for Safari browser as well?

Alex-302 commented 7 months ago

@slavaleleka In Safari || matches only one subdomain, as I remember.

Alex-302 commented 7 months ago

If 3.2.1.sub.domain.com: ||sub.domain.com^ - for regular ad blockers .sub.domain.com^ - addition only for Safari CB. It probably doesn't make sense to do that.

slavaleleka commented 7 months ago

it makes sense to be done but not in this repo then

jellizaveta commented 7 months ago

The task was moved to the appropriate repositories. https://github.com/AdguardTeam/FiltersRegistry/issues/946 https://github.com/AdguardTeam/FiltersCompiler/issues/217