System-wide adblocker
Go to file
Tomkoid c29d161a2b
chore: improve code with cargo clippy
Signed-off-by: Tomkoid <tomaszierl@outlook.com>
2024-03-24 18:21:47 +01:00
.cargo build(deps): update dependencies and use sparse protocol by default 2023-06-24 23:00:59 +02:00
logo logo: update 2024-03-24 17:22:30 +01:00
man-pages man-pages/blokator: Added --restore-android command 2023-02-17 18:02:35 +01:00
packages PKGBUILD: Changed the url of the project 2023-02-26 11:31:36 +01:00
src chore: improve code with cargo clippy 2024-03-24 18:21:47 +01:00
.gitignore build(deps): add Cargo.lock 2023-04-11 20:47:20 +02:00
.woodpecker.yml ci: init 2024-03-23 18:47:38 +01:00
build-appimage.sh Make AppImage 2022-10-24 19:19:42 +02:00
Cargo.lock feat: implement parallel downloads 2024-03-24 18:14:05 +01:00
Cargo.toml feat: implement parallel downloads 2024-03-24 18:14:05 +01:00
LICENSE LICENSE: update copyright year and added correct program name 2024-03-21 18:50:54 +01:00
Makefile Makefile: Added man page installation to install 2022-11-16 17:56:36 +01:00
README.md docs(readme): remove "Simple" 2024-03-21 18:45:31 +01:00
replace-string.sh Updated copyright year to 2023 and added replace-string.sh script 2023-01-02 11:16:14 +01:00
update-version.sh Make AppImage 2022-10-24 19:19:42 +02:00

Blokator - System-wide CLI adblocker

asciicast

How it works

Blokator is hosts-based. The hosts file is a way to map hostnames to IP addresses, which acts like local DNS server.

Features

  • Apply
  • Revert
  • Create a backup of current hosts file
  • Restore backup
  • Sync
  • Add custom repos
  • Delete custom repos
  • Access custom repos with TOR
  • Apply for Android device (experimental, root required)

Compatibility

Blokator can run basically everywhere. These are the tested platforms:

  • Linux (just works)
  • BSDs (just works)
  • Windows (works, but for normal Windows user it is not user-friendly)

Supported init systems

  • SystemD
  • Runit
  • OpenRC
  • s6

If you have another init system or networking service, you can restart it manually or even reboot the computer.

Known issues

  • Colors don't work on Windows
  • OpenRC NetworkManager restart can return exit with status 1 so Blokator thinks that the restart of NetworkManager failed

Usage

After you installed Blokator, you need to sync the hosts files. To sync the hosts files, run Blokator with --sync argument:

blokator sync

Then you can enable Blokator with --apply argument:

blokator apply

To add your own hosts file, you can add your repo with --add-repo argument:

blokator add-repo <URL>

To delete repo you added, you can run Blokator with --del-repo argument:

blokator del-repo <URL>

To display the help page with all available commands, you can run Blokator with --help argument:

blokator --help

You will find more usage examples in man page

Installation

Manual / Compilation

Before you begin, make sure you have installed these things:

  • Rust
  • Cargo
  • Make
  • OpenSSL
  • pkg-config

With Cargo

You can install Blokator easily with Cargo package manager:

cargo install blokator

MAKE SURE THAT ~/.cargo/bin IS IN YOUR $PATH

With Git and Make

First, you need to clone the git repo to your local machine:

git clone https://codeberg.org/tomkoid/blokator.git

Now go to the new cloned directory:

cd blokator

In that directory you can build Blokator using make:

make build

And install it to the system:

sudo make install

You're done now!

From package manager

At this moment, Blokator is available only in the AUR for Arch Linux.

To download Blokator from AUR it's recommended to use AUR helper to install Blokator.