Add feature to import publicly maintained regex lists

Background: https://github.com/pi-hole/pi-hole/issues/3088

Are you talking about adding a pre-compiled list from an external source?

Yes

You can add individual regex/wildcard blacklist entries from the web UI, however…

And that is a problem.

I understand that its not supported for false-positive reasons.
But adding every line by hand is a pain.
And overwriting /etc/pihole/regex.list seems not a good idea.

Suggestion 1

I dont see a format in the current lists. I did not check the code but seems like there is no hard format-rules.

What about upgrading the import for external regex sources with strict rules?
First rules:
an external regex source list must

  • end with .regex (or what you would like to use as extension)
  • have (valid) regex rules only

This way we could share lists including regex

Suggestion 2
What about an import for regex sources?
Just a simple multiple file upload that gets added to the regex.list.

I read this one: External regex/wildcard blocklists
But it was just a question if it exists.
I ask to implement this.

Please clarify what you want to do. Do you want to go to a list of regex filters on the web and then import them directly into your local regex list? Or, are you looking for a way to import adBlock-style blocklists into Pi-Hole? If so, please provide an example of such a file or a line entry from that file that you wish to import.

I don’t understand this. What is not supported? Are you referring to the discontinued feature where Pi-Hole would parse adBlock style lists into HOSTS format?

What current lists are these - adBlock formatted lists on the internet?

If you have a file that contains a number of regex entries (one per line), you can just copy and paste those lines directly into file /etc/pihole/adlists.list , save the file and restart FTL.

If you have a file that has a number of adBlock style entries, these will need to be manually converted to either domains or regex, then imported into either your blacklist using the correct selection (exact or regex).’

DISCLAIMER - the file locations for regex and blacklist and whitelist will not be the same in V5.0 and later. The discussion above is accurate for V4.x only.

I actually wanted a preview of my post but we dont have this feature here … so i submitted and wanted to read it again. But then i could not see it because of this “needs to be approved” thing … so …

Im asking for a way get domains and its subdomans blocked.
See: https://github.com/pi-hole/pi-hole/issues/3088

I always though pihole works like “domain.com” blocks this domain and all its subdomains.

Seems not the case and regext dont work in blacklists.

So it would be nice to get this working somehow. Perhaps through shared regex blocklists.

i really have a hard time writing a reply in this kind of popup. You may change this too?

On the web admin blacklist page, type domain.com and enter as wildcard. Pi-Hole will convert this to regex and this domain and all subdomains will be blocked.

If you have a list of regex already prepared or found on the internet, copy them all and add these to file /etc/pihole/regex.list and restart FTL.

Please read.

Also you suggestion makes no sense since those files wont exist in 5.0 anymore.

I came here to post a featurerequest as told me on git.
Feels now like talking to a tech support that feeds me with default answers.

I will try it in one sentence:
Please add a regex-blacklist import
so we can get domains and their subdomains blocked (as actually expected)
and people|projects can share those lists.

Thanks.

EDIT: fixed highlighting … omg this twitter like posting is annoying.

We understand the feature request now. The title has been changed to match the request.

Note: just run over related topic: Load regexps from "host file"

It is to the right of where you are typing:

That’s just how it is. You can make the composer full screen by clicking the arrows to the right of the popup:

image

The markdown syntax is the same as on github…

Anyway. Lets keep discussion about this particular platform to the Meta category. Please help keep threads on the topic that they are started.

I would love to see an easy import function for regexes as easy als importing blocklists.