Recently I stumbled over a hosts file I wanted to include in my pi-hole. The problem is: The hosts file is not provided in text form, only as a zipped file. So I couldn’t just add the URL to my adlist.list, but had to download and extract the file manually.
Now, I could just add this hosts file to dnsmasq.conf, but then it’s not ‘integrated’ with pi-hole. That’s why I tried to add it throuh the adlist.list file with
The problems with this:
The curl works, but because the http response code is 000 instead of 200, the gravity script considers it as error (even though the curl works just fine)
You can get it work by renaming the file to the “pihole lists format”, but the name has to be “” [empty], probably because the name is read between the second / and the third / (https://domainname.com/), but the local address in adlists.list is file:/// (3 slashes).
Could you implement the recognition of a local file (with file://) in the gravity script so that the name is not empty and the http resonse code 000 is a success for the local file?
I think this is probably a few minutes thing if you’re familiar with the gravity script code.
Or could there be an easier solution for importing zipped hosts file into pi-hole?