|
|
|
|
|
by oceliker
1426 days ago
|
|
Would it be possible to use this to target specific domains rather than IP blocks? I have been looking for a way to break my instant gratification browsing habits (twitter, reddit etc.) by introducing random delays into those websites, essentially making them barely usable, which works a lot better than blocking them outright. There are some existing browser extensions with a similar idea, but they usually only delay the initial load, so once you get through that barrier you are allowed to browse freely. I could manually do a DNS lookup and plug the IP address in, but I don't know enough about internet protocols to know whether that would work with Cloudflare etc. |
|
With that said, you could try to limit things based on the IP range of the resolved IP of a domain. Other services the same company runs might be a casualty in this cross-fire, but maybe that's not a problem.
Make this:
Into this: The `whois ... dig .. grep cidr` stuff gets a CIDR from the currently resolved IP address from a DNS query. So probably you want to add this as a systemd service or something, which restarts each five minutes or something (as what the dig command returns will change over time), and you probably want to add multiple domains (like the domains they use for APIs, CDNs and so on) as well.