# hectorm/hblock

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

Repository: https://github.com/hectorm/hblock
Canonical: https://ross.abutalabs.com/products/hblock
Homepage: https://hblock.molinero.dev
Language: Shell
License: MIT
License Family: permissive
Topics: ad-blocker, adblock, adblocker, ads, advertisements, blocker, dns, dnsmasq, hosts, hostsfile, malware, privacy, protection, ransomware, security, shell, trackers, tracking, trojans, unified-hosts
Last push: 2026-07-01T05:22:21+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 16, longevity 100
- inputs: {"age_days": 4030, "days_push": 63, "days_rel": 539, "gap_med": 140, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1981, forks 117 (observed 2026-08-28T04:06:01.726619+00:00)

## What it is
hBlock is a POSIX-compliant shell script that aggregates domains serving ads, trackers, and malware from multiple blocklist sources and generates a hosts file (plus alternative formats) that blocks connections to them. It replaces the system hosts file by default and supports allowlists, blocklists, and scheduled updates via systemd timers.

## Use cases
- block ads at the OS level without a browser extension
- block tracking and telemetry domains system-wide
- protect against malware, ransomware, and trojan domains via DNS blocking
- generate a unified hosts file from multiple blocklists
- set up scheduled automatic blocklist updates on a Linux server
- temporarily disable ad blocking to troubleshoot a site

## When to choose
- you want system-wide ad and tracker blocking without installing a proxy or DNS server
- you prefer a lightweight, dependency-free shell script over heavy ad-blocking software
- you want to combine multiple blocklist sources into one hosts file
- you run Linux, macOS, or BSD and want simple CLI-based protection

## When to avoid
- you need per-device or per-application filtering with dashboards and statistics (use Pi-hole or AdGuard Home instead)
- you cannot modify your system hosts file (e.g., managed or locked-down devices)
- you need HTTPS-level ad filtering or cosmetic ad hiding, which hosts-file blocking cannot do
- you have existing hosts file entries you cannot back up or migrate

## Facets
- artifact type: cli-tool
- maturity: active
- function: security, privacy, cli, networking
- domain: security, privacy, self-hosted
- platform: bsd, cli, cross-platform
- tags: ad-blocker, hosts-file, dns-blocking, shell-script, malware-blocking, tracker-blocking, command-line, linux, macos

## Member repositories
- hectorm/hblock (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:01.726619+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:03:58.054384+00:00, confidence not recorded.
  - readme: https://github.com/hectorm/hblock (fetched 2026-08-28T04:06:01.726619+00:00, sha 2d8a7b8e13df)
- Data as of 2026-08-30T08:39:29.467469+00:00.
