Improve your security and privacy by blocking ads, tracking and malware domains. https://hblock.molinero.dev
  • Shell 87.4%
  • Makefile 5.5%
  • Roff 4.4%
  • M4 2.7%
Find a file
Héctor Molinero Fernández 7eccf5aab8 Defined SKIP_INSTALL_SERVICE=1
2021-01-03 13:28:00 +01:00
.github/workflows Removed transitional package "dh-systemd" from build dependencies 2021-01-03 13:07:20 +01:00
resources Defined SKIP_INSTALL_SERVICE=1 2021-01-03 13:28:00 +01:00
.gitignore Improved package creation 2020-10-18 16:22:25 +02:00
.gitlab-ci.yml Removed transitional package "dh-systemd" from build dependencies 2021-01-03 13:07:20 +01:00
BSDmakefile Prefer "command -v" over "which" 2020-10-21 23:25:18 +02:00
hblock 3.1.2 2021-01-02 15:24:48 +01:00
hblock.1 3.1.2 2021-01-02 15:24:48 +01:00
hblock.1.md 3.1.2 2021-01-02 15:24:48 +01:00
LICENSE.md Updated license year 2021-01-02 15:03:36 +01:00
Makefile Added APKBUILD package 2020-11-07 16:25:27 +01:00
PACKAGES.md Updated docs 2020-10-23 01:13:02 +02:00
README.md 3.1.2 2021-01-02 15:24:48 +01:00
SHA256SUMS 3.1.2 2021-01-02 15:24:48 +01:00
SOURCES.md Removed deprecated malwaredomains.com lists 2020-12-05 14:09:56 +01:00

Improve your security and privacy by blocking ads, tracking and malware domains.

What is this for?

hBlock is a POSIX-compliant shell script that gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file, among other formats, that prevents your system from connecting to them.

Installation

hBlock is available in various package managers. Please check the PACKAGES.md file for an up-to-date list.

The latest available version can also be installed manually by running the following commands:

curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.1.2/hblock' \
  && echo '0f5a0f6219a346be5551760e6ec5245c56cae146c5fb05fdc752819e0e93b42f  /tmp/hblock' | shasum -c \
  && sudo mv /tmp/hblock /usr/local/bin/hblock \
  && sudo chown root:root /usr/local/bin/hblock \
  && sudo chmod 755 /usr/local/bin/hblock

Additionally, a systemd timer can be set to regularly update the hosts file for new additions.

Usage

The default behavior of hBlock can be adjusted with multiple options. Use the --help option or check the hblock.1.md file for the full list.

asciicast

Nightly builds

Nightly builds of the hosts file, among other formats, can be found on the hBlock website.