Dns forwarder.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
scripts
.editorconfig
.gitignore
LICENSE
Makefile
README.md
TODO
cacheresolver.go
conf.go
dnsforwarder.yml
doc.go
fileresolver.go
forwarder.go
glide.lock
glide.yaml
handler.go
host.go
limiter.go
logger.go
main.go
record.go
server.go

README.md

DnsForwarder

GitHub license Join the chat at https://gitter.im/codebear4/dnsforwarder Build Status Go Report Card Github All Releases

A dns forwarder.

  • Resolve with multiple upstreams
  • Caching the record from upstreams
  • Support local hosts files
  • White list support

Getting started

Installation

Build from source

Make sure you have a correctly configured Go installtion first, then:

$ make bootstrap
$ go build
Install with package

Download packages from github releases page.

Configuration

forcetcp: If set it to true, server will use TCP connection with upstreams even the request from client is UDP request.

cache:

  • enable: Enable or disable in-memory cache
  • ttl: Default TTL for cache

loggers:

  • console:
    • enable: Enable or disable console logger
    • level: Log level for console logger
  • file:
    • enable: Enable or disable file logger
    • level: Log level for file logger
    • path: Log file path

timeout:

  • server:
    • read: Timeout for read from clients
    • write: Timeout for write to clients
  • forwarder:
    • read: Timeout for read from upstreams
    • write: Timeout for write to upstreams

host:

  • enable: Resolve with hosts files
  • resolves: Hosts files list

upstreams: List of upstream dns servers

Running

Build from source
$ sudo dnsforwarder
Install from package
$ service dnsforwarder start # upstart
$ systemctl start dnsforwarder #systemd

Testing

$ dig domain.tld @your.server.ip

TODO

  • Cache persistence
  • Packaging
  • Hot-reload