Skip to content

Website blocker, that works by modifying the hosts file

Notifications You must be signed in to change notification settings

bython17/website_blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website blocker

This program allows you to block and unblock websites from the command line by modifying the hosts file.

Installation

You can use the program by downloading a binary from the releases. For manual builds use the following method.

NOTE: Make sure to have the rust compiler and cargo installed.

  • Clone the repository and cd into it
git clone https://github.com/bython17/website_blocker && cd website_blocker
  • Then build the app in release mode
cargo build --release

Usage

Using the app is very simple

  • To list the currently blocked sites
website_blocker list
  • To block a site using the app
website_blocker block anyste.com 0.0.0.0
  • To unblock a site using the app
website_blocker unblock anysite.com

NOTE: You will need elevated privileges to run the program. That means using cmd or powershell in administrative mode in windows or by using sudo before the command in *nix systems.

Notice

This is a program that I wrote to learn the rust programming language. It has a very basic code and it might not be efficient at all. There are a lot of better programs than this one that allow blocking sites in a more better way. So I will only recommend this for reading the code.

About

Website blocker, that works by modifying the hosts file

Topics

Resources

Stars

Watchers

Forks

Languages