Skip to content

Add a linter rule that checks whether the domain is alive or not #194

@ameshkov

Description

@ameshkov

We can use urlfilter.adtidy.org to quickly check whether a domain is alive or not.

Here's how it can be done:
https://urlfilter.adtidy.org/v2/checkDomains?domain=doubleclick.net&domain=doubleclick.com

The response will contain this structure:

        "info": {
            "domain_name": "doubleclick.com",
            "used_last_24_hours": true,
            "registered_domain": "doubleclick.com",
            "registered_domain_used_last_24_hours": true
        },

If used_last_24_hours is false the domain is most likely dead and we can show a warning about it.

What rules we should analyze:

  1. All modifiers with domain names: $domain, $denyallow, etc.
  2. Cosmetic rules with domains.
  3. Basic rules with pattern that looks like this: ||example.org^.

What's problematic about this all:

  1. The operation must be async so in order to create such a rule we'll need to change the LinterRule interface.
  2. We should analyze many domains at once (up to 500) in order to not overload the server.
  3. We'll need to implement a local PERSISTENT cache and provide a way to clear it whenever it's required.
  4. It must NOT be enabled in the default ruleset of AGLint.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions