Request: show regex, responsible for blocking

Works beautifully, great job.

1 Like

domainid=0 may be a thing, not found anything would be -1 and should be ignored.

Do you have a filter with id=0 in your database?
Check with

sqlite3 /etc/pihole/gravity.db "SELECT id,domain FROM domainlist;

You're welcome.

id=0 not in domainlist, first entry is 1

edit
anything I need to provide?
/edit

found another entry in the query log, not covered by the solution:

in the query log:

pihole -q says:

pi@raspberrypi:~ $ pihole -q platform.instagram.com
  [i] No results found for platform.instagram.com within the block lists
pi@raspberrypi:~ $ pihole -q instagram.c10r.facebook.com
 Match found in regex blacklist
   ^(.+\.)??(facebook|.*fb.+)\.(com|net)$

I would expect to see the link (regex match) in the status column, but it isn't there.

edit
cosmetic, something to consider, eye candy...
when mouseover on the domain entry, it shows a tooltip: click to show only queries with domain …
it might be more consistent to change the link sign (behind the regex match in the status column) with a tooltip on the word regex, that says click to show the regex match, only visible when mouseover.
/edit

Yes, this is the right diagnosis. I somehow missed that.

Here you go, please try if my simply copy-pasta worked. I'm not in the position to test this right now (no Pi-hole within reach):

pihole checkout web tweak/show_cname_regex_link

There may be more work needed for this, but, for now, I just hope I did the necessary work already in the backend.

edit Eye candy included + domainid=0 issue identified and fixed as well (this was from a query imported from the database!)

I assume you mean (only the web interface?):

pihole checkout web tweak/show_cname_regex_link

stopped pihole-FTL, removed database and logs, cleared browser cache.
Sorry, but I don't see any change (no link, no tooltip):

did you mean my suggestion to change the link sign into tooltip? if so, the entire text, including the link sign, is now a link, but the tooltip only appears if the mouse is on the link sign (which is now obsolete - the tooltip says it all...).
edit
the other fields (domain and client) turn blue on mouseover and show the tooltip (greenshot cannot capture tooltips).



/edit

also noticed a new query entry that I've never seen before, please explain (NXRA).
image

I had a typo in my command, maybe that was your issue? It is fixed now.

edit Okay, so more work is needed inside FTL, todo for another day.

edit 2 The reason for the absence of the regex link is that we record the responsible regex ID for the domain that was blocked within the CNAME inspection but do not propagate this information up to the parent domain. WIP.

means reply was NXDOMAIN with DNS RA bit set. This is commonly used by Quad9 to signal that a domain was blocked by them, hence "external".

@anon55913113 @jpgpi250 Please try

pihole checkout ftl fix/db_regexlink_id

to get the expected CNAME links. There is a bit of additional bookkeeping FTL needs to do here for this to work.

I also updated the web code slightly for an overall more uniform experience.

do we need to?:
pihole checkout web tweak/show_cname_regex_link
and
pihole checkout ftl fix/db_regexlink_id

Yes, exactly that.

YOU NAILED IT... GREAT WORK



and

I'll keep this running until after the weekend, to ensure there are no side effects or unexpected FTL crashes, but I'm confident! Hope to see this in beta5 soon.

Thanks again for your time, dedication, effort, persistence, …

edit
If somebody is going to write a manual on how to use this great new feature, you should emphasize CTRL clicking the link will open the group management page in a new tab, which makes life even easier.
/edit

What happens if you click normally on the link? I designed it in such a way that is should open a new tab. I'm not using HTML <a> at all in this code.

I use Edge (NOT Edge chromium yet) When I click on the link, the domain management page opens in the same tab (replaces the queries page). I use a wheel mouse. I normally open a link using a wheel click, which always opens the link in a new tab, but that doesn't work in the pihole web interface.
Also tested with firefox. The wheel click also doesn't work, but a normal click DOES open the domain management page in a new tab, so the behavior is browser dependent.

Okay, so this is something we cannot/should not do much about. The events are standard DataTables events and if Edge decides to handle them differently than the majority of other browsers, then we should wait for either DataTables or (rather!) the browser maintainer to fix this misbehavior.

Well, if it is and or or doesn't really matter, it depends on your point of view:

  • and: They all offer this feature
  • or: You can click on any one of them

Hmm, the link icon is a bit distracting in my view, how about underlining the text to symbolize it has a special meaning?

No, file:// is the "protocol". In your example,

two things are connected file:// and /home/pi/blocklist.txt. You see that the third slash belongs to the path and not the protocol of the address so file:/ is indeed correct.

I agree, furthermore, if you are going to change this, you'll need to change this in a lot of places (all entries that have an underlying link), otherwise, You'll be deviating from the overall more uniform experience, that has been achieved with the latest update.

I'm using local (filesystem) lists myself, I've never seen this message, using the syntax (example) file:///home/pi/BL/tracker/domains

@anon55913113 Does pihole -q local give any result? I agree with @jpgpi250 not having seen this before.


We're slowly getting there...now with an underlined link. Users should be familiar enough with the web that underlined text usually means "click me".

1 Like

A post was split to a new topic: Web checkout error

I guess there is no real way of doing it right with the regex link, the current way of doing it seems unobtrusive and highlights that there is something special about this text. We can leave it like this and see if users complain IMHO.

So these two dots really show up in there? I assume you put them in, just asking to be sure. You should better put something more obvious such as <redacted> in there to clearly highlight that this is human-made.

This code has now been merged into the beta.

Please go back to the main beta branch to continue receiving updates:

pihole checkout web release/v5.0
pihole checkout ftl release/v5.0

Thanks for all your inputs and helping us make Pi-hole a better software for us all!