Skip to content
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

Simple list format for gravity.list and black.list #259

Merged
merged 7 commits into from
Apr 23, 2018

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Apr 21, 2018

By submitting this pull request, I confirm the following (please check boxes, eg [X]) 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 request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


This PR introduces a few improvements for huge block lists:

  • File size of lists is reduced by a factor of 3-4x:
    • no need for HOSTS format with tons of repeated information where the IP addresses are often longer than the blocked entries
    • no need for adding two entries for IPv4 and IPv6
  • Speed up of list importing of about factor 2x
    • we have to prepare the IP structures for lists only once
  • Flexibility
    • as we fully control the addition of host entries in the FTL codebase, we can change details and add e.g. NXDOMAIN information so that exact blocking with NXDOMAIN replies becomes possible.

This PR has the advantage of removing unnecessary overhead introduced by config or HOSTS notation as this does not add any additional information here.

If we agree on this, I will add exact NXDOMAIN blocking in a follow-up PR.

Note that this PR depends on you having checked out FTLDNS-gravity-simplelists and ran gravity at least once on this branch. Further details here: pi-hole/pi-hole#2140

This template was created based on the work of udemy-dl.

…ds up list importing by about 2x

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from a team April 21, 2018 21:41
Signed-off-by: DL6ER <dl6er@dl6er.de>
…s thanks to the new lists format

Signed-off-by: DL6ER <dl6er@dl6er.de>
…ld reply with IPv4/IPv6 addresses (need 2 cache slots per domain) or with NXDOMAIN (need 1 cache slot per domain)

Signed-off-by: DL6ER <dl6er@dl6er.de>
… FTL hook

Signed-off-by: DL6ER <dl6er@dl6er.de>
… still in HOSTS format, we accept this, print a message that the user should run pihole -g and still import the lists as regular hosts lists. Note that BLOCKINGMODE=NXDOMAIN won't work with HOSTS lists import.

Signed-off-by: DL6ER <dl6er@dl6er.de>
…quire a valid IP address for NXDOMAIN blocking...

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER merged commit 5b5b988 into development Apr 23, 2018
@DL6ER DL6ER deleted the FTLDNS-domainlists branch April 23, 2018 19:28
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/implement-response-zone-policies-nxdomain-for-end-user-performance-increase/1342/19

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/implement-response-zone-policies-nxdomain-for-end-user-performance-increase/1342/27

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/nxdomain-and-null-blocking-with-ftldns/9634/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants