MCPcopy Create free account
hub / github.com/corny/dnscheck

github.com/corny/dnscheck @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
94 symbols 226 edges 26 files ⚖ AGPL-3.0 34 documented · 36% ● updated 17d ago★ 354 open issues

Browse by type

⨍ Functions 79◇ Types & classes 15
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DNS Check

Build Status

This code powers the DNS check of the Public DNS list service. It is written in Go and it scales very well.

Dependencies

Configuration

Database configuration

The database is given as a PostgreSQL connection string via --database or the environment variable DSN. The format is documented at the pgx package documentation.

Database scheme

The schema is created automatically on start, see internal/store/schema.sql.

Domain list

Create a list of domains to query the nameservers for. You should include at least one domain that does not exist. All of the domains should resolve to the same IP addresses (not location based / GeoIP).

wikileaks.org
www.dnssec-tools.org
does-not-exist.invalid

See domains.txt for the list in use.

Usage

Build the binary:

go build ./cmd/dnscheck

The serve command runs continuously: it serves the web pages of public-dns.info and ungefiltert-surfen.de, checks all nameservers, exports them every 4 hours and purges old data once a day. The language of the pages depends on the host name; on other hosts, ?lang=de selects German. If MAXMIND_ACCOUNT_ID and MAXMIND_LICENSE_KEY are set, it downloads the GeoLite2 databases into <data-dir>/geoip and updates them daily; otherwise it uses the files GeoLite2-City.mmdb and GeoLite2-ASN.mmdb found there. The export files are written to <data-dir>/export. --data-dir defaults to /data; missing directories are created.

dnscheck -h prints a list of all supported arguments. Example:

dnscheck serve --domains path/to/domains.txt --database "host=/var/run/postgresql dbname=publicdns" --data-dir path/to/data

Docker

Every push to main builds an image and pushes it to ghcr.io/corny/dnscheck with the tags main and sha-<commit>. The image runs dnscheck serve as a non-root user and keeps the export files and GeoLite2 databases in the volume /data.

docker run -d -p 8000:8000 -v dnscheck:/data \
  -e DSN="host=db user=nameservers password=... dbname=nameservers" \
  -e MAXMIND_ACCOUNT_ID=... -e MAXMIND_LICENSE_KEY=... \
  ghcr.io/corny/dnscheck:main

TLS is terminated by a reverse proxy in front of the container, which must pass the original Host header so the pages are served in the right language. LISTEN_ADDRESS sets the listening address (default :8000), for example 127.0.0.1:8000 with host networking behind a local reverse proxy.

Extension points exported contracts — how you extend this code

—

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 46
Function 33
Struct 11
Interface 2
TypeAlias 2

Languages

Go100%

Modules by API surface

export/exporter.go13 symbols
geoip/geoip.go7 symbols
check/lookup_test.go7 symbols
export/writer.go5 symbols
export/nameserver.go5 symbols
check/lookup.go5 symbols
prometheus.go4 symbols
export/run.go4 symbols
export/exporter_csv.go4 symbols
check/work.go4 symbols
check/checker.go4 symbols
export/exporter_text.go3 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page