Adding Easylist, DNSCRYPT and others lists that contain more than hosts

It is a pity that pihole still can't use Easylist or DNSCRYPT lists as they include wildcards.

Im surprised that pihole doesn't include filter :

Please provide URLs for some of the lists you reference.

Continuing the discussion from Adding Easylist, DNSCRYPT and others lists that contain more than hosts:

The desired behaviour is that pihole will parse the list and reformat wildcards and or add them to wildcard / regex. It doesn't

Whats worse is that in some cases pihole will add a domain with the wildcard to gravity and as not supported messes up gravity.

This means that can't use such lists without parsing manually first and have to keep separate DNSCRYPT lists

"-----head of gravity.list------

Not possible, dns is only domain blocker.
Maybe you like this?:

Thanks I will give that a try - looks interesting and useful.

I realise its domain blocker but expected that the list combine and cleanup would remove unsupported wildcard entries but they appear in gravity. I suspect that the combine & clean up functions aren't working well in general. I did a test with a big list and saw no noticeable change in gravity.

Pi-Hole uses hosts format for the gravity list, and if your subscribed blocklists are in hosts format, you will have no problems. The developers have added some ability for Pi-Hole to import other list types, but there are many lists available online and some are poorly formatted, formatted for a completely different ad-blocking method, etc.

Thanks. There are two items here. Pihole ability to import non hosts format and the ability to combine & clean up hosts format. I have noticed that large lists in hosts format are not not added to gravity (I think Pihole can't parse large lists) and when there are items in file like *.domain they are not removed.

Size of the list doesn't matter, we parse everything line by line. And *.domain is non-hosts by definition.

I tested with a large list 14m (hosts with no visible non hosts) and gravity only ended up with 1m. I couldn't figure out what the combine and cleanup function was doing but will look when have more time. I briefly checked some unique domains that wouldn't be affected by regex rules in case that was used in the cleanup function but they were not in gravity.

Agree *.domain is non-hosts but often hosts files have such entries in error in particular when users have both DNScrypt lists and pihole.

What is the URL of the large list you loaded?

I cant send that one but I just tested using another large one and see the same results

Are you using as your list entry, or as your list entry?

dschaper@nanopineo:/etc/pihole$ sudo curl -o three.list
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17.3M  100 17.3M    0     0  9354k      0  0:00:01  0:00:01 --:--:-- 9352k
dschaper@nanopineo:/etc/pihole$ wc -l three.list
909512 three.list
dschaper@nanopineo:/etc/pihole$ ls -la three.list
-rw-r--r-- 1 root root 18195920 Mar 22 12:12 three.list


Thanks for taking a look. This one isn't as large obviously but its easier to work with; it had 909513 and 867809 ended up in pihole. Is there a log to see what entries were discarded and why?

I can see that there are some without tld so they were probably discarded but not sure how pihole decides what to discard.

Things like the below malformed domains will be dropped.


yep I saw that.
Its hard to debug without having the log of what was removed & why

Open up the blocklist files before you import them, and see what's in them. If they have junk in them, Pi-Hole will try to remove it but cannot remove all junk.

Here is the code for the gravity script - you can see for yourself how it works:

1 Like

Thanks I will try to get to the bottom of it. It's definitely missing some junk and removing some that it shouldn't.

You should use lists that are properly formatted for Pi-Hole; this will resolve the problem.

1 Like

Thanks but that doesn't resolve the problems.