agentcooper / hosts-cop

Restore /etc/hosts each time you remove sites from it (macOS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hosts cop

/etc/hosts file is pretty useful for blocking websites (guide). Once you learn how to do it, it is also easy to unblock them.

Hosts cop will restore /etc/hosts file to the previous version each time you try to remove blocked sites from it.

notification

Adding sites to /etc/hosts will not trigger a notification.

For macOS.

Install

git clone https://github.com/agentcooper/hosts-cop
sudo ./hosts-cop/start

Stop

# from hosts-cop directory
sudo ./stop

Why sudo?

Script needs to run from /Library/LaunchDaemons/ to be able to write to /etc/hosts.

About

Restore /etc/hosts each time you remove sites from it (macOS)


Languages

Language:Shell 70.5%Language:Python 29.5%