MCPcopy
hub / github.com/0xERR0R/blocky

github.com/0xERR0R/blocky @v0.33.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.33.0 ↗
3,047 symbols 9,974 edges 349 files 1,204 documented · 40%
README

GitHub Workflow Status GitHub Workflow Status GitHub latest version GitHub Release Date GitHub go.mod Go version Docker pulls Docker Image Size (latest) Codecov Codacy grade Go Report Card Donation Liberapay receiving

Blocky

Blocky is a DNS proxy and ad-blocker for the local network written in Go with following features:

Features

  • Blocking - Blocking of DNS queries with external lists (Ad-block, malware) and allowlisting

  • Definition of allow/denylists per client group (Kids, Smart home devices, etc.)

  • Periodical reload of external allow/denylists
  • Regex support
  • Blocking of request domain, response CNAME (deep CNAME inspection) and response IP addresses (against IP lists)

  • Advanced DNS configuration - not just an ad-blocker

  • Custom DNS resolution for certain domain names

  • Conditional forwarding to external DNS server
  • Upstream resolvers can be defined per client group

  • Performance - Improves speed and performance in your network

  • Customizable caching of DNS answers for queries -> improves DNS resolution speed and reduces amount of external DNS queries

  • Prefetching and caching of often used queries
  • Using multiple external resolver simultaneously
  • Low memory footprint

  • Various Protocols - Supports modern DNS protocols

  • DNS over UDP and TCP

  • DNS over HTTPS (aka DoH)
  • DNS over TLS (aka DoT)
  • DNS over QUIC (aka DoQ, RFC 9250)
  • DNS over HTTPS/3 (aka DoH3, RFC 9114)

  • Security and Privacy - Secure communication

  • Supports modern DNS extensions: DNSSEC, eDNS, ...

  • DNSSEC validation of upstream resolvers
  • Free configurable blocking lists - no hidden filtering etc.
  • Provides DoH Endpoint
  • Uses random upstream resolvers from the configuration - increases your privacy through the distribution of your DNS traffic over multiple provider
  • Blocky does NOT collect any user data, telemetry, statistics etc.

  • Integration - various integration

  • Prometheus metrics

  • Prepared Grafana dashboards (Prometheus and database)
  • Logging of DNS queries per day / per client in CSV format or MySQL/MariaDB/PostgreSQL/Timescale database - easy to analyze
  • Various REST API endpoints
  • CLI tool

  • Simple configuration - single or multiple configuration files in YAML format

  • Simple to maintain

  • Simple to backup

  • Simple installation/configuration - blocky was designed for simple installation

  • Stateless (no database, no temporary files)

  • Docker image with Multi-arch support
  • Single binary
  • Supports x86-64, ARM, and MIPS architectures -> runs fine on Raspberry PI and OpenWrt routers
  • Community supported Helm chart for k8s deployment

❤️ Support Blocky

Blocky is free, open source, and built entirely in my spare time — with no telemetry, no data collection, and no hidden filtering. It keeps the DNS for thousands of home networks, homelabs, and businesses clean and private, and it always will.

Maintaining a project this size — fixing bugs, reviewing pull requests, shipping new features, and keeping up with security — takes a lot of time. Thousands of people run Blocky; only a handful support it. If Blocky is useful to you, please consider chipping in. Your support directly funds ongoing development and helps keep Blocky independent and ad-free, forever.

Even a small recurring contribution makes a real difference and is hugely appreciated. 🙏

Sponsor on GitHub Support on thanks.dev Donate on Liberapay Buy me a coffee on Ko-fi Donate via PayPal

Thank you to everyone who supports Blocky! ❤️

Quick start

You can jump to Installation chapter in the documentation.

Full documentation

You can find full documentation and configuration examples at: https://0xERR0R.github.io/blocky/

Contribution

Issues, feature suggestions and pull requests are welcome!

ko-fi

Extension points exported contracts — how you extend this code

BlockingControl (Interface)
BlockingControl interface to control the blocking status [8 implementers]
api/api_interface_impl.go
Resolver (Interface)
Resolver generic interface for all resolvers [5 implementers]
resolver/resolver.go
Resolver (Interface)
Resolver is the interface for DNS resolution (minimal interface to avoid import cycles) [5 implementers]
resolver/dnssec/validator.go
Writer (Interface)
(no doc) [6 implementers]
querylog/writer.go
FileDownloader (Interface)
FileDownloader is able to download some text file [4 implementers]
lists/downloader.go
Configurable (Interface)
(no doc) [30 implementers]
config/config.go
Matcher (Interface)
Matcher checks if a domain is in a list [2 implementers]
lists/list_cache.go
ReloadPublishable (Interface)
ReloadPublishable is implemented by inner caches that reload entries internally (e.g. the prefetching cache). The Redis [1 …
cache/redis.go

Core symbols most depended-on inside this repo

Resolve
called by 440
resolver/dnssec/validator.go
q
called by 403
web/static/rapidoc-min.js
BeDNSRecord
called by 338
helpertest/helper.go
NewMsgWithQuestion
called by 313
util/common.go
HaveResponseType
called by 247
helpertest/helper.go
doDNSRequest
called by 228
e2e/helper.go
HaveReturnCode
called by 223
helpertest/helper.go
newRequest
called by 222
resolver/resolver.go

Shape

Function 1,338
Method 1,262
Struct 297
Interface 47
TypeAlias 46
Class 44
FuncType 13

Languages

Go72%
TypeScript28%

Modules by API surface

web/static/rapidoc-min.js840 symbols
api/api_server.gen.go108 symbols
api/api_client.gen.go82 symbols
config/config_enum.go80 symbols
api/mocks_test.go68 symbols
config/config.go62 symbols
resolver/mocks.go46 symbols
resolver/blocking_resolver.go45 symbols
server/server.go39 symbols
resolver/resolver.go38 symbols
resolver/upstream_resolver.go35 symbols
cache/stringcache/string_caches.go34 symbols

Dependencies from manifests, versioned

dario.cat/mergov1.0.2 · 1×
filippo.io/edwards25519v1.1.1 · 1×
github.com/0xERR0R/expiration-cachev0.2.0 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/DATA-DOG/go-sqlmockv1.5.2 · 1×
github.com/Masterminds/goutilsv1.1.1 · 1×
github.com/Masterminds/semver/v3v3.4.0 · 1×
github.com/Masterminds/sprig/v3v3.3.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/ThinkChaos/parcourv0.0.0-2023071017175 · 1×
github.com/abice/go-enumv0.9.2 · 1×
github.com/alicebob/miniredis/v2v2.38.0 · 1×

Datastores touched

blocky_query_logDatabase · 1 repos
dbDatabase · 1 repos
db_nameDatabase · 1 repos
userDatabase · 1 repos

For agents

$ claude mcp add blocky \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact