Better gravity list: Removing duplicate domains (wildcards)

#1

Example:
I have this line in /etc/dnsmasq.d/03-pihole-wildcard.conf:

address=/trackuity.com/192.168.2.250

However, in /etc/pihole/gravity.list, I still find:

192.168.2.250 static.trackuity.com
192.168.2.250 api.trackuity.com

Request: improve the routine to remove duplicate domains, so it takes the wildcard entries into account.

Warning: don’t remove:

192.168.2.250 trackuity.vacature.com

it’s a different domain…

Add ability to run commands / scripts after certain actions
#2

In the end of the pihole -g procedure remove all domains in the gravity.list which also are captured bij the wildcard list

An example: Wildcard is .doubleclick.net
In the gravity.list a domain like rd.intl.doubleclick.net can be removed. It’s double.

This reduces the size of the gravity.list, makes the PiHole a little bit faster and reduce some memory.

#3

Regex blocking in v4.0 should address this.

https://docs.pi-hole.net/ftldns/regex/overview/