Like Pi Hole but for gophers.
 
 
 
Go to file
Adam Veldhousen 1a349fa2b8
some refactoring
2020-06-12 20:20:33 -05:00
deployment fixup code a bunch 2020-06-01 02:08:57 -05:00
.gitignore initial commit 2020-05-30 00:40:04 -05:00
Dockerfile fixup code a bunch 2020-06-01 02:08:57 -05:00
LICENSE readme, license 2020-06-01 02:39:38 -05:00
README.md added a bunch of crap 2020-06-06 22:22:52 -05:00
blocklists.go added a bunch of crap 2020-06-06 22:22:52 -05:00
blocklists_test.go fix tests added http module 2020-06-01 19:55:22 -05:00
config.go added a bunch of crap 2020-06-06 22:22:52 -05:00
config.json added a bunch of crap 2020-06-06 22:22:52 -05:00
dns.go some refactoring 2020-06-12 20:20:33 -05:00
go.mod readme, license 2020-06-01 02:39:38 -05:00
go.sum initial commit 2020-05-30 00:40:04 -05:00
http.go added a bunch of crap 2020-06-06 22:22:52 -05:00
main.go added a bunch of crap 2020-06-06 22:22:52 -05:00
makefile some refactoring 2020-06-12 20:20:33 -05:00

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/

  • Has support for custom DNS records and block lists.
  • Supports custom upstream DNS servers for recursively resolving domains.
  • Supports reloading block lists via HTTP API.
  • Setting to use hosts file as upstream
  • Generate example config command.
  • 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