https://github.com/jrmadsen/trackingblocker
Interface to update and maintain a HOSTS file on Linux/macOS systems that block DNS queries from ad and tracking websites from every leaving your computer
https://github.com/jrmadsen/trackingblocker
Last synced: 3 months ago
JSON representation
Interface to update and maintain a HOSTS file on Linux/macOS systems that block DNS queries from ad and tracking websites from every leaving your computer
- Host: GitHub
- URL: https://github.com/jrmadsen/trackingblocker
- Owner: jrmadsen
- License: mit
- Created: 2017-09-15T21:24:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-07T02:02:16.000Z (about 6 years ago)
- Last Synced: 2025-01-14T07:14:55.227Z (4 months ago)
- Language: C++
- Size: 8.5 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TrackingBlocker
This is an application for updating a list of DNS names and re-routing the domain name IP address query
to the localhost (127.0.0.1)The effect of re-routing the IP address lookup is that instead of some website receiving the request
the request never leaves your computer. By doing this, you block access to that website on the computer
regardless of which browser is being used. Your computer thinks the website in question (e.g. espn.com)
is at IP address 127.0.0.1 so no information or request is received by the website.This transparency of this application is ideal to security. For plugins like AdBlocker, you cannot
see where those requests are being sent to. Also, you cannot see what AdBlocker is doing with your
requests (hint: they are logging those requests and your traffic and they make money selling that
information to companies willing to pay for it so, really, AdBlocker removes ads but your information
is still compromised).The C++ program "combine_hosts" is used to sort and update the list of domains being blocked. Run:
$ ./combine_hosts -h
to see the command line options. You have to specify your original hosts file (located in /etc/hosts on
Linux and macOS, sorry no Windows support). The application will also download the latests WINHOSTS
file, which is a freely available HOSTS file that maintains a database of websites known for tracking.The Python application "TrackingBlocker.py" handles the usage. It is wrapped around a bash script
"tracking_blocker" that ensures that the necessary privileges are acquired to modify the HOSTS file.
This python application will handle turning the tracking blocker on and off and allow one to add
domains (e.g. you are on a website, see an ad, right-click and copy the link address of the ad,
and then use:$ sudo tracking_blocker add ads.gsd.com
Strip all the junk after the .com/.net/etc. and do not include with the www. prefix or anything before
that (e.g. http://). Two entries: ads.gsd.com and www.ads.gsd.com will be added to the tracking blocker
and then run:$ sudo tracking_blocker status on
to active the updated list. If at any time you want to disable the tracking/ad blocker, run:
$ sudo tracking_blocker status off
To remove a particular entry, replace 'add' with 'remove', e.g.:
$ sudo tracking_blocker remove ads.gsd.com
The removals are stored because on occassion, when updating from WINHOSTS, previously removed
domains will be added back in. To re-remove this previous removals run:$ sudo tracking_blocker remove -l
or
$ sudo tracking_blocker remove --load-previous-removesThere is preliminary support for a Qt interface (not fully working currently) and preliminary
support for different profiles (default is '0' i.e., hosts.profile.0). This idea behind this
is the ability to maintain a various level of ad-blocking.