Like Pi Hole but for gophers.
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 2d3d6bea05
readme, license
4 years ago
deployment fixup code a bunch 4 years ago
.gitignore initial commit 4 years ago
Dockerfile fixup code a bunch 4 years ago
LICENSE readme, license 4 years ago
README.md readme, license 4 years ago
blocklists.go fixup code a bunch 4 years ago
blocklists_test.go use correct name in dns header, fixes blacklisting 4 years ago
config.go fixup code a bunch 4 years ago
config.json fixup code a bunch 4 years ago
dns.go allow setting forward IP address for blocked domains 4 years ago
go.mod readme, license 4 years ago
go.sum initial commit 4 years ago
main.go allow setting forward IP address for blocked domains 4 years ago
makefile fixup code a bunch 4 years ago

README.md

Gopherhole

DNS server for blocking ads. Like Pi hole but for hackers.

  • Has support for custom DNS records and block lists.
  • Supports custom upstream DNS servers for recursively resolving domains
  • Supports adding block lists and records via HTTP API.
  • Prometheus metrics support.
  • HTTP JSON API metrics.
  • DNS over HTTPS

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