Skip to content

Blocks ad & malware URLs system wide in all applications, not just in the browser. Loads known advertising and malware hosts to the Mac OS X /etc/hosts file. This results in an incapacity to load these hosts, blocking ads in all programs system wide.

License

actuallymentor/adblock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hosts File Adblock

npm version NSP Status

Blocks ad & malware URLs system wide in all applications, not just in the browser. Loads known advertising and malware hosts from this github project to the Mac OS X /etc/hosts file. This results in an incapacity to load these hosts, blocking ads in all programs system wide.

Compatibility: tested on Mac OSX Sierra.

Getting started

Make sure to have NodeJS installed. Then use npm to globally install adblock:

npm install -g adblock

Start off by making a backup of your hosts file:

sudo adblock init

Then enable and disable adblock as needed

sudo adblock enable
sudo adblock disable

NOTE: The hosts file is a system file, this is why adblock needs to be run with sudo.

Caveats

The hosts file blocks system wie network calls. If you need to be able to reach certain ad/tracking domains (e.g. Google Analytics) you will have to disable adblock.

About

Blocks ad & malware URLs system wide in all applications, not just in the browser. Loads known advertising and malware hosts to the Mac OS X /etc/hosts file. This results in an incapacity to load these hosts, blocking ads in all programs system wide.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published