Hey guys, I think this might be a good idea specially where memory is becoming a constraint.
- Remove domains that return NXDOMAIN from the local gravity list.
- Reduce the amount of memory used by the gravity list for storing dead domains.
- Reduce heating of the device if gravity list is very large to begin with and contains a large amount of dead domains.
- There is no guarantee that the domains won’t come back to life.
- Caveat fix -> Update the domains from source once more.
This option can live in the “Danger zone”, it will run a script to check if the currently listed domains in the local blocklist returns NXDOMAIN and if it does, remove said domain from the list ( freeing up some mem space ).
I have a pi 3b+ and have only added one additional third party block-list and that has increased my total blocked domains to roughly 1.5M putting my memory usage around 20-23%. Now for the 3b+ that’s not an issue since it has 1GB of ram, but if you are running / wanting to run Pi-hole on an earlier Pi release then it would become problematic.
I think this feature is pretty safe, the only worry I might have is how exactly the pinging / checking of the domains existence might work and if the users could exploit it.
Awesome work so far, keep it up