-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make adlist ID available, rename queries.regex_id -> queries.list_id #1841
Conversation
…dy now used to also store exact matching domainlist entries by their ID. This commit further extends this to also store the (first) matching anti-/gravity list (if available) Signed-off-by: DL6ER <[email protected]>
…istinguish from domains rather easily. Users are free to foil this method when they force negative IDs into the database but they will never be automatically created Signed-off-by: DL6ER <[email protected]>
…ading to a crash in heavy TCP worker activity Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <[email protected]>
Conflicts have been resolved. |
What if a blocked domain is on multiple adlists? Are we just taking the id/name of the first adlist that we find a match for? |
Yes, and there is not even a guarantee which one this is as it highly depends on the tree-structure of the database index. Regardless, the ID returned here will be the one that triggered the block so that's always correct. But yeah, as you implied, there is no guarantee that disabling/removing this one adlist will cause the domain to be permitted afterwards. |
Is it worth potentially making |
We don't have more than one adlist_id (the first one) because we stop looking for additional matches once we find the first hit. This is a necessary simplification as it avoids a needless full scan of the index (which eats additional time). If you would like to be fully-correct, we'd even have to continue scanning if there is possibly some additional stuff like regex or deny list entries blocking this ... you see where this is going ... |
Actually, I don't like adding the Renaming |
I agree with yubiuser. Since the same domain can be on multiple lists (and many users have more than one list), knowing the "the first one"
We could add a link like |
Note that this mindset may also question |
I like this idea. It seems like a regression at first, but is the right thing to do after consideration. (It's a bit like switching from line to bar graphs). If there are multiple adlists and/or regex that influence an allow/block decision it seems wrong to show a single "random" responsible adlist/regex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with web and core branches
Agree with Yubi here, I'm unsure of the benefit of showing a link to the first adlist we find the domain in. Lets say this causes the user to rethink that adlist and remove it. If it is in more than one list, then they wait and see it blocked again, and again click the link and maybe rethink that next list..... it's all a rather drawn out process. "Domain was blocked: click here to find out what lists it was on" with a link to /search seems to be the best way to go, both in computational efficiency and in meaningfulness (is that a word? It is now) to an end user |
The image on the PR is outdated. The current code is showing a link to the Search page, as it was suggested. |
Lol, I didn't yet check or test the code - and as I didn't see any commits after the conversation.... I guess the old code was FP'd away :) |
The related code was changed in web PR, but the conversation was kept here, in one place. |
Signed-off-by: DL6ER <[email protected]>
What does this implement/fix?
Important
This PR needs both core and web branches with the same name to work.
Furthermore, you will have to run
pihole -g
at least once to upgrade your gravity database such that the list IDs become available for FTL. This should be done automatically duringcheckout
/update
.Rename
query_storage.regex_id
toquery_storage.list_id
as it is already now used to also store exact matchingdomainlist
entries by their ID. This commit further extends this to also store the (first) matchinganti-/gravity
list (if available).Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.