-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
Add blacklisting wildcard support #312
Conversation
Query Log has still to be adjusted to account for the wildcard entries (they are not contained within the gravity lists). |
…cked DNS queries due to wildcard blocking
Ready for Check and Merge as of now. Note that wildcard blocked entries do not appear in the Top Advertisers list. I'll add this later since it will depend on #297 which has to be merged first (bug fix + improvement on the algorithms). |
Conflicts: scripts/pi-hole/js/queries.js
On hold since I don't know and Adam can't remember how we can effectively whitelist subdomains of wildcard blocked domains. |
Disregard my comment above - let's get wildcard blocking running! We will tell the users that everything they wildcard block will be gone. Maybe there is an user who can come up with a clever idea on how to do the selective whitelisting. If not - they should not use it. |
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.
Everything looks like it's working! Just a few things.
<?php if($list === "black") { ?> | ||
<h3>Wildcard blocking</h3> | ||
<ul class="list-group" id="list-wildcard"></ul> | ||
<?php } ?> |
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.
The headings don't show up unless the page is reloaded. Maybe dynamically change it via JS.
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.
Can you change between black- and whitelist without reloading the page?
@@ -136,7 +138,8 @@ $(document).ready(function() { | |||
}); | |||
$("#all-queries tbody").on( "click", "button", function () { | |||
var data = tableApi.row( $(this).parents("tr") ).data(); | |||
if (data[4] === "Pi-holed") | |||
status = data[4]; | |||
if (status.substr(0,2) === "Pi") |
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.
Since you can't whitelist a wildcard-blocked domain, we should not show the whitelist button. Same idea on the Core repo with the block page.
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.
Good catch, will do that, although on the main page it will be much more difficult (it does not know on loading of the page as the blocking reason comes in only later via AJAX).
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.
Actually, thinking about it wildcard whitelisting should be fairly trivial, too. Let's say you want to whitelist
I made a post about this, I forgot! : https://discourse.pi-hole.net/t/how-do-i-add-wildcard-sites-to-the-blacklist/337 |
By submitting this pull request, I confirm the following (please check boxes, eg [X] - no spaces) Failure to fill the template will close your PR:
Please submit all pull requests against the
development
branch. Failure to do so will delay or deny your requestHow familiar are you with the codebase?: 10
Pi-hole core: pi-hole/pi-hole#1065
Add blacklisting wildcard support to the web UI.
Blocked:
Not blocked:
This template was created based on the work of
udemy-dl
.