Skip to content

[DNR] Add support for wildcards in initiatorDomains and excludedInitiatorDomains fields #394

@maximtop

Description

@maximtop

This is a common scenario where a domain has multiple variations of the same domain name in different domain zones.

I've counted over 700 rules in AdGuard filters that follow this pattern. Here's an example of such a rule:

/1.js|$domain=kat.*|kickass.*|kickass2.*|kickasstorrents.*|kat2.*|kattracker.*|thekat.*|thekickass.*|kickassz.*|kickasstorrents2.*|topkickass.*|kickassgo.*|kkickass.*|kkat. *|kickasst.*|kick4ss.*|katbay.*|kickasshydra.*|kickasskat.*|kickassbay.*|torrentkat.*|kickassuk.*|torrentskickass.*|kickasspk.*|kickasstrusty.*|katkickass.*|kickassindia. *|kickass-usa.*|kickassaustralia.*|kickassdb.*|kathydra.*|kickassminds.*|kickassunlocked.*|kickassmovies.*|kickassfull.*|bigkickass.*|katfreak.*|kickasstracker.*.

Introducing wildcards would reduce the size of DNR rulesets and make life easier for filter developers.

The rule in the ruleset could look like this

[
    {
        "id": 1,
        "action": {
            "type": "block"
        },
        "condition": {
            "urlFilter": "/adscript",
            "initiatorDomains": ["example.*"]
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-up: safariNeeds a response from a Safari representativeneutral: chromeNot opposed or supportive from Chromeneutral: firefoxNot opposed or supportive from Firefoxtopic: dnrRelated to declarativeNetRequest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions