You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Adam Veldhousen
2961cc28f4
|
4 years ago | |
---|---|---|
deployment | 4 years ago | |
.gitignore | 4 years ago | |
Dockerfile | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
blocklists.go | 4 years ago | |
blocklists_test.go | 4 years ago | |
config.go | 4 years ago | |
config.json | 4 years ago | |
dns.go | 4 years ago | |
go.mod | 4 years ago | |
go.sum | 4 years ago | |
http.go | 4 years ago | |
main.go | 4 years ago | |
makefile | 4 years ago |
README.md
Gopherhole
Go built DNS server for blocking ads. Like Pi-hole but for hackers.
Works with Pi-hole block lists.
Find more Pi-Hole compatible block lists here: https://firebog.net/
- Custom Manual DNS records
- Allow and Deny lists
- Custom upstream DNS servers for recursively resolving domains.
- HTTP API (text based and JSON formats)
- header
X-Gopherhole-
- CRUD and refresh for block list entries
- CRUD and refresh for white list entries
- CRUD for upstream servers
- CRUD for custom records
- CRUD for all other settings
- header
- DNS over HTTPS.
- Optionally respect hosts file for upstream resolvers
- Generate example config command
- Prometheus metrics support.
- structured JSON logging
- Client IP, Domain, resolver answer, resolver used, UTC time, elapsed time, was blocked, cached state
- DHCP server
How to use
-
go get git.vdhsn.com/adam/gopherhole
-
run like so:
gopherhole -config ./config.json -bind-http 127.0.0.1 -bind-dns 127.0.0.1 -block-forward-ip 127.0.0.1
-
example config.json file below:
{ "upstream": [ "1.1.1.1", "8.8.8.8" ], "records": { "mynas.internal": { "Type": "A", "Record": "192.168.0.99" }, "eyeofsauron.com": { "Type": "CNAME", "Record": "www.google.com" } }, "blocklists": [ "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts", "https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt", "https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt" ] }
License
GPL-V3