grimd

⚡ Fast dns proxy, built to black-hole internet advertisements and malware servers. Capable of custom DNS.
Forked from looterz/grimd
Installation
go install github.com/cottand/grimd@latest
You can also download one of the releases or docker images. Detailed guides and resources can be found on the wiki.
Docker Installation
To quickly get grimd up and running with docker, run
docker run -d -p 53:53/udp -p 53:53/tcp -p 8080:8080/tcp ghcr.io/cottand/grimd:latest
Alternatively, download the docker-compose.yml file and launch it using docker-compose.
docker-compose up -d
Configuration
By default, grimd binds DNS to 0.0.0.0:53 and loads a few known blocklists. The default settings should be enough for most.
See the wiki for the full config, including defaults and dynamic config reloading.
CLI Flags
$ grimd -help
Usage of grimd:
-config string
location of the config file (default "grimd.toml")
-update
force an update of the blocklist database
Building
Requires golang 1.7 or higher, you build grimd like any other golang application, for example to build for linux x64
env GOOS=linux GOARCH=amd64 go build -v github.com/looterz/grimd
Building Docker
Run container and test
mkdir sources
docker build -t grimd:latest -f docker/alpine.Dockerfile . && \
docker run -v $PWD/sources:/sources --rm -it -P --name grimd-test grimd:latest --config /sources/grimd.toml --update
By default, if the program runs in a docker, it will automatically replace 127.0.0.1 in the default configuration with 0.0.0.0 to ensure that the API interface is available.
curl -H "Accept: application/json" http://127.0.0.1:55006/application/active
Speed
Incoming requests spawn a goroutine and are served concurrently, and the block cache resides in-memory to allow for rapid lookups, while answered queries are cached allowing grimd to serve thousands of queries at once while maintaining a memory footprint of under 15mb for 100,000 blocked domains!
Daemonize
You can find examples of different daemon scripts for grimd on the wiki.
Objectives
These are some of the things I would like to contribute in this fork:
-
ARM64 Docker builds
- Better custom DNS support
-
Dynamic config reload for custom DNS issue#16
-
Fix multi-record responses issue#5
- DNS record flattening issue#1
- Service discovery integrations? issue#4
- Prometheus metrics exporter issue#3
- DNS over HTTPS #2
- Add lots of docs
Non-objectives
Not keeping it simple: I would like grimd to become
a reliable custom DNS provider (like CoreDNS) and a reliable
adblocker (like Blocky) that has the perfect set of features
for self-hosters, and potentially for more critical setups.