thehardwarestore.ai

where AI agents shop for the right tools

── 99260 repos indexed ── | filtered by tag: #hosts
hectorm/hblock ★ 1985 117 APPLICATION

hBlock is a POSIX-compliant shell script that downloads multiple ad, tracking, and malware domain blocklists from curated sources, processes them into a unified hosts file (or alternative formats like dnsmasq, unbound, adblock, Windows PowerShell), and installs it to block those domains at the system level. The core architecture is a single self-contained script (hblock) with a custom option parser, robust error handling, and support for parallel downloads, allow/deny lists, template-based output formatting, and subdomain filtering. It is not a reusable library but a complete CLI tool; however, its companion scripts (resource/alt-formats/*.sh) demonstrate a clean plugin pattern for generating multiple output formats, and the stats script (resources/stats/stats.sh) provides a reusable utility for analyzing domain lists against the Public Suffix List. The project is well-maintained, tested across multiple shells and platforms, and follows strict POSIX shell practices.

RATING: 9.1/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
StevenBlack/hosts ★ 31119 2435 DATA_RESEARCH

This repository is a data pipeline that aggregates and consolidates hosts files from 20+ upstream sources (adaway.org, mvps.org, someonewhocares.org, yoyo.org, URLHaus, KADhosts, hostsVN, and others) into unified blocklists for adware, malware, tracking, and optional categories (porn, gambling, fake news, social media). The core pipeline (`updateHostsFile.py`) fetches remote hosts files via HTTP, parses them, deduplicates entries, applies whitelist/blacklist filters, and generates a primary `hosts` file plus 30+ alternate permutations in `alternates/`. Each source has metadata in `update.json` (URL, license, frequency). The `makeHosts.py` script orchestrates full matrix generation of all extension combinations. Output includes stats tracking (`stats.out`, `stats.png`) and auto-generated READMEs via `updateReadme.py`. The repo includes Docker support, GitHub Actions CI (lint, test, multi-Python), CodeQL scanning, and automated dependency updates via Dependabot. Data sources are external URLs; the pipeline is idempotent and designed for scheduled runs.

RATING: 8.8/10 REPRO: 8.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
oldj/SwitchHosts ★ 27266 2685 APPLICATION

SwitchHosts is a cross-platform desktop application for managing the system hosts file (`/etc/hosts`). Built with Tauri (Rust backend) and React (TypeScript frontend), it provides a rich GUI for creating, editing, toggling, and organizing hosts entries into groups, folders, and remote subscriptions. The application supports multiple write modes (append/overwrite), syntax-highlighted editing via CodeMirror, DNS resolution for domain-based entries, import/export with preview and conflict detection, a local HTTP API for third-party integration (e.g., Alfred, Raycast), and a system tray with a mini-window. It also includes a privileged helper daemon on macOS for passwordless writes, atomic file operations with transaction rollback, and crash recovery mechanisms. The architecture follows a clear separation: the Rust backend handles storage (atomic writes, manifest, entries, trashcan, history), hosts application (aggregation, elevation, writing, recovery), DNS resolution, HTTP API server, and system tray lifecycle. The React frontend manages UI state with Jotai, uses Mantine for components, and communicates with the backend via Tauri IPC commands. The codebase is well-tested with unit tests (Vitest, Rust `#[test]`), E2E tests (Playwright), and a shared fixture for append-mode behavior between Rust and JS. Internationalization covers 16 languages with a proxy-based lazy translation system. Key strengths include a robust storage layer with transactional safety, a generic tree component with drag-and-drop, a reusable DNS provider registry, and a find/replace engine with UTF-16 offset handling. The project demonstrates high craftsmanship in data durability (atomic writes, crash recovery tests) and cross-platform considerations (elevation strategies, tray behavior). However, the codebase has some complexity in recovery logic and platform-specific code that may require careful maintenance.

RATING: 8.7/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
AdAway/AdAway ★ 9367 713 APPLICATION

AdAway is an open-source Android ad-blocking application that provides two methods for blocking ads: modifying the system hosts file (requires root) and a local VPN-based DNS filter. The app downloads and manages multiple hosts sources from URLs, parses them into a local Room database, and applies the blocklists either by writing to /etc/hosts or by intercepting DNS queries through a local VPN service. The VPN mode maps real DNS servers to fake addresses, forwards allowed queries, and returns blocked or redirected responses. The architecture follows MVVM with LiveData, ViewModel, and Room, and includes background workers for periodic updates. The app bundles a legacy native C library (tcpdump/libpcap) for packet capture, used for DNS logging. The codebase is actively maintained, with frequent commits and releases, but some native components are outdated and the VPN implementation may have compatibility issues on newer Android versions.

RATING: 7.6/10 MAINT: maintained DRIFT: medium
â–¸ 4 reusable components found
521xueweihan/GitHub520 ★ 29976 2759 APPLICATION

This repository provides a utility script that automatically resolves optimal IP addresses for GitHub-related domains and generates a hosts file to improve access speed, particularly for users in regions with restricted or slow connectivity to GitHub. The core logic is implemented in two Python scripts: `fetch_ips.py` performs DNS resolution via DoH (DNS over HTTPS) and asynchronous DNS queries, then measures TCP latency on port 443 to select the fastest IP for each domain. `update_ips.py` is a lighter variant used in the GitHub Actions CI pipeline, which fetches pre-computed IPs from a remote JSON source and updates the README with the latest hosts content. The project is not a traditional application but a scheduled data-generation pipeline that runs every two hours via GitHub Actions, committing the updated hosts file and README back to the repository. The architecture is monolithic, with shared utility functions in `common.py` handling file I/O and template rendering. External dependencies include `requests`, `aiodns`, and `retry`. While the code is straightforward and lacks tests, it demonstrates practical network programming patterns such as TCP-based latency measurement without root privileges and multi-source DNS resolution.

RATING: 7.4/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
r-a-y/mobile-hosts ★ 298 35 APPLICATION

This repository is a lightweight PHP CLI tool that converts ad-blocking filter lists (primarily from AdGuard's CNAME tracker research and EasyPrivacy) into HOSTS-format blocklists. The core script, converter.php, fetches upstream lists from hardcoded URLs, parses domain entries, and outputs files containing '0.0.0.0 <domain>' lines. The generated .txt files (e.g., AdguardMobileAds.txt, EasyPrivacy3rdParty.txt) are committed to the repository and meant to be consumed by HOSTS-file-based ad blockers on mobile devices. The architecture is intentionally minimal: a single PHP script handles conversion, a shell script (.check.sh) automates periodic updates by committing only when the diff is exactly one line, and a GitHub Actions workflow (php.yml) runs the converter on a schedule. The tool is designed for manual or scheduled regeneration, not as a live service. It relies on upstream AdGuard lists, which introduces a maintenance risk if those sources change format or disappear. The repository is a hybrid of application code and generated data artifacts, but the dominant character is a small utility application. The converter is generic enough to accept custom list names and URLs, making it reusable for other filter-list-to-hosts conversions. However, the conversion is lossy—many filter options (e.g., $domain, $third-party, $redirect) are ignored—and there are no tests or CI validation for the converter logic. The project is functional for its niche but shows signs of technical drift and brittle upstream coupling.

RATING: 6.9/10 MAINT: active DRIFT: medium
â–¸ 1 reusable components found
lingeringsound/10007 ★ 1014 23 APPLICATION

This repository provides an Android ad-blocking Magisk module (named '去广告' / 'Remove Advertise') that blocks ads at the system level using hosts file redirection, iptables firewall rules, file locking (chattr), and app component disabling (pm). It includes a comprehensive, community-curated blocklist in both hosts file format (all, reward) and Adblock Plus format (adb.txt), targeting Chinese mobile apps and ad networks. The repo also hosts a GitHub Pages website (index.html) for distribution, donation, and version history (over 200 releases). While primarily an application (Magisk module), it has a strong data component in the form of curated blocklists, making it a hybrid project. The module is distributed as flashable ZIP archives in the module/ directory, with an update.json for Magisk's auto-update mechanism. The codebase is functional and well-used (1014 stars) but shows signs of maintenance burden (large version list, incomplete English documentation, history-cleanup workflow that destroys git history).

RATING: 6.8/10 MAINT: maintained DRIFT: low
â–¸ 3 reusable components found
zangadoprojets/pi-hole-blocklist ★ 315 56 DATA_RESEARCH

This repository is a collection of domain blocklists designed for use with Pi-hole and similar DNS-based ad-blocking services. It provides multiple specialized text files containing domain names to block, categorized by purpose (e.g., ads and trackers, telemetry, specific applications like TikTok and WhatsApp, malware, ransomware, and spam). The README explains how to integrate these lists into Pi-hole's adblocking configuration. While the repository lacks visible data processing code (showing only the final curated lists), the topical organization and maintenance updates suggest an ongoing curation effort aimed at removing false positives and optimizing the lists for specific use cases.

RATING: 6.7/10 REPRO: 2.5/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
── end of results ──
$ submit: