Add a linter rule that checks whether the domain is alive or not
ameshkov opened this issue · 1 comments
ameshkov commented
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:
- All modifiers with domain names:
$domain
,$denyallow
, etc. - Cosmetic rules with domains.
- Basic rules with pattern that looks like this:
||example.org^
.
What's problematic about this all:
- The operation must be async so in order to create such a rule we'll need to change the
LinterRule
interface. - We should analyze many domains at once (up to 500) in order to not overload the server.
- We'll need to implement a local PERSISTENT cache and provide a way to clear it whenever it's required.
- It must NOT be enabled in the default ruleset of AGLint.
scripthunter7 commented