anudeepND / whitelist

A simple tool to add commonly white listed domains to your Pi-Hole setup.
MIT License
4.18k stars 281 forks source link

whitelist.txt vs domains.sql and remote vs local #181

Closed abulgatz closed 3 years ago

abulgatz commented 3 years ago

Which file is used to add whitelist domains in Pi-hole 5.0? Is it whitelist.txt, domains.sql, or both?

Can the README.md be updated to describe the use of all files? Can we get some better comments in whitelist.py?

It appears that whitelist.py calls whitelist.txt locally but domains.sql via remote url. Why the mix?

mwoolweaver commented 3 years ago

https://github.com/anudeepND/whitelist/blob/master/scripts/whitelist.py#L72 - this is where whitelist.txt is fetched from github

https://github.com/anudeepND/whitelist/blob/master/scripts/whitelist.py#L73 - this is where whitelist.sql is fetched from github

Which file is used to add whitelist domains in Pi-hole 5.0?

domains.sql

It appears that whitelist.py calls whitelist.txt locally

here you will notice that anudeep_whitelist_location is for the previously installed anudeep/whitelist.

here you will also notice that whitelist_remote_url is where the list from github is used.

mwoolweaver commented 3 years ago

Can we get some better comments in whitelist.py?

maybe this (https://github.com/anudeepND/whitelist/pull/184/commits/1936ee545dd8c06d47e5c77028211d6e5128415a) is better

abulgatz commented 3 years ago

Thanks for the explanation and the comments!

anudeepND commented 3 years ago

Sorry for the late reply, since the script has to support the legacy version and lots of users have set up the script run every week so any domains added to the repo will be pulled and applied automatically (no need to clone the repo again)