Open ameshkov opened 1 year ago
To achieve this, i think first we should extend the current NetworkRuleParser
, e.g. to DnsRuleParser
, which can parse /etc/hosts
and domains-only
syntax. We should also create the corresponding "sub-parsers":
EtcHostsRuleParser
andDomainsOnlyRuleParser
.Of course, NetworkRuleParser
remains in its current form, we just introduce a new parser that also uses NetworkRuleParser
.
A couple examples that don't work on adguard-dns.io dashboard and are not flagged by the linter:
@@/adguard.(com|org|info)/^
@@||/adguard.(com|org|info)/^
I suggest adding support for linting DNS filtering rules as well: https://adguard-dns.io/kb/general/dns-filtering-syntax/
We'll need to differentiate DNS lists from traditional lists and it seems that the "user agent" string can be used for that. For instance,
[AdGuard DNS]
.