Blocky: Fast and Lightweight DNS Proxy and Ad-Blocker for Your Network

Blocky: Fast and Lightweight DNS Proxy and Ad-Blocker for Your Network

Summary

Blocky is a fast and lightweight DNS proxy designed to function as an ad-blocker for your local network. Written in Go, it offers extensive features including advanced DNS configuration, various protocol support like DoH and DoT, and robust security and privacy measures, making it an excellent self-hosted solution.

Repository Info

Updated on October 12, 2025
View on GitHub

Introduction

Blocky is an open-source, high-performance DNS proxy and ad-blocker built in Go, designed to enhance your local network's security and browsing experience. It effectively blocks ads and malware by filtering DNS queries, offering a comprehensive solution for network-wide content control. With its lightweight footprint and extensive feature set, Blocky provides a powerful alternative to traditional ad-blocking methods.

Installation

Getting started with Blocky is straightforward, designed for simplicity and quick deployment. The project offers a single binary for direct execution and a multi-arch Docker image, making it suitable for various environments, including Raspberry Pi. For detailed installation instructions and quick start guides, please refer to the official Blocky documentation (opens in a new tab).

Examples

Blocky goes beyond basic ad-blocking, providing advanced DNS configuration options. You can define custom DNS resolutions for specific domains, implement conditional forwarding to different external DNS servers, and even assign unique upstream resolvers per client group (e.g., Kids, Smart home devices). It supports blocking based on request domain, CNAME, and IP addresses, along with allowlisting and denylisting capabilities. For comprehensive examples and configuration details, visit the full documentation (opens in a new tab).

Why Use Blocky?

Blocky stands out for several compelling reasons. It significantly improves network speed and performance through customizable DNS caching, prefetching of frequently used queries, and simultaneous use of multiple external resolvers. Security and privacy are paramount, with support for modern DNS protocols like DNS over HTTPS (DoH) and DNS over TLS (DoT), DNSSEC, and a strict policy of not collecting any user data or telemetry. Its simple YAML configuration, stateless design, and integration with tools like Prometheus and Grafana make it highly flexible and easy to manage for self-hosted environments.

Links