Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ameshkov opened this issue Jan 26, 2024 · 1 comment
Open

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

ameshkov opened this issue Jan 26, 2024 · 1 comment

Comments

@ameshkov
Copy link
Member

ameshkov commented Jan 26, 2024

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.
@scripthunter7
Copy link
Member

@ameshkov #188 may related

@scripthunter7 scripthunter7 added the T: Linter rule Linter rule related label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants