Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/actuallymentor/adblock
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.
https://github.com/actuallymentor/adblock
Last synced: 4 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/actuallymentor/adblock
- Owner: actuallymentor
- License: mit
- Created: 2016-12-14T15:08:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-15T12:03:06.000Z (almost 8 years ago)
- Last Synced: 2024-11-04T21:46:09.828Z (10 days ago)
- Language: JavaScript
- Homepage:
- Size: 250 KB
- Stars: 16
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hosts File Adblock
[![npm version](https://badge.fury.io/js/adblock.svg)](https://badge.fury.io/js/adblock) [![NSP Status](https://nodesecurity.io/orgs/open-source-projects/projects/24c3e1ac-5186-4cad-a7d0-092d0500c6c4/badge)](https://nodesecurity.io/orgs/open-source-projects/projects/24c3e1ac-5186-4cad-a7d0-092d0500c6c4)Blocks ad & malware URLs system wide in all applications, not just in the browser. Loads known advertising and malware hosts from [this github project]( https://github.com/StevenBlack/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.
**Compatibility:** tested on Mac OSX Sierra.
## Getting started
Make sure to have [ NodeJS ]( https://nodejs.org/en/ ) installed. Then use npm to globally install adblock:
```shell
npm install -g adblock
```Start off by making a backup of your hosts file:
```shell
sudo adblock init
```Then enable and disable adblock as needed
```shell
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.