|Geoffrey Frogeye b076fa6c34 Typo in new source URL||1 day ago|
|dist||1 month ago|
|rules||6 days ago|
|rules_adblock||1 week ago|
|rules_hosts||1 week ago|
|rules_ip||6 days ago|
|subdomains||1 month ago|
|temp||1 week ago|
|tests||6 days ago|
|websites||1 month ago|
|.gitignore||1 month ago|
|README.md||4 weeks ago|
|adblock_to_domain_list.py||1 week ago|
|collect_subdomains.py||1 month ago|
|collect_subdomains.sh||6 days ago|
|eulaurarien.sh||1 week ago|
|fetch_resources.sh||1 day ago|
|filter_subdomains.py||6 days ago|
|filter_subdomains.sh||6 days ago|
|regexes.py||1 month ago|
|resolve_subdomains.py||1 week ago|
|resolve_subdomains.sh||6 days ago|
Generates a host list of first-party trackers for ad-blocking.
The latest list is available here: https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt
DISCLAIMER: I’m by no way an expert on this subject so my vocabulary or other stuff might be wrong. Use at your own risk.
Traditionally, websites load trackers scripts directly.
website2.com both load
https://trackercompany.com/trackerscript.js to track their users.
In order to block those, one can simply block the host
However, to circumvent this easy block, tracker companies made the website using them load trackers from
The latter being a DNS redirection to
website1.trackercompany.com, directly pointing to a server serving the tracking script.
Those are the first-party trackers.
trackercompany.com doesn’t work any more, and blocking
*.trackercompany.com isn’t really possible since:
So the only solution is to block every
somethingirelevant.website1.com-like subdomains known, which is a lot.
That’s where this scripts comes in, to generate a list of such subdomains.
It takes an input a list of websites with trackers included. So far, this list is manually-generated from the list of clients of such first-party trackers (latter we should use a general list of websites to be more exhaustive). It open each ones of those websites (just the homepage) in a web browser, and record the domains of the network requests the page makes.
Additionaly, or alternatively, you can feed the script some browsing history and get domains from there.
It then find the DNS redirections of those domains, and compare with regexes of known tracking domains. It finally outputs the matching ones.
Just to build the list, you can find an already-built list in the releases.
(if you don’t want to collect the subdomains, you can skip the following)
This is only if you want to build the list yourself. If you just want to use the list, the latest build is available here: https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt It was build using additional sources not included in this repository for privacy reasons.
The list of websites provided in this script is by no mean exhaustive, so adding your own browsing history will help create a better list. Here’s reference command for possible sources:
sqlite3 /etc/pihole-FTL.db "select distinct domain from queries" > /path/to/eulaurarien/subdomains/my-pihole.custom.list
cp ~/.mozilla/firefox/<your_profile>.default/places.sqlite temp; sqlite3 temp "select distinct rev_host from moz_places" | rev | sed 's|^\.||' > /path/to/eulaurarien/subdomains/my-firefox.custom.list; rm temp
This is a long step, and might be memory-intensive from time to time.
This step is optional if you already added personal sources.
Alternatively, you can get just download the list of subdomains used to generate the official block list here: https://hostfiles.frogeye.fr/from_websites.cache.list (put it in the
Make sure your system is configured with a DNS server without limitation.
The files you need will be in the folder
Just add the URL to the relevant list:
Just add them to