Skip to content

Latest commit

 

History

History
84 lines (53 loc) · 2.27 KB

README.md

File metadata and controls

84 lines (53 loc) · 2.27 KB

Build Status GoDoc LICENSE Go Report Card

simple dns server

a simple dns server 

feature

  • consul based configure file
  • standard zone file support
  • dynamic load zone files
  • client-ip(CIDR) based zone query
  • outter dns server proxy with auto switch
  • dns proxy with localcache, with this feature will enable proxy consul dns service to public
  • multiple resolve with ping check

build from source

required go version >= 1.10

go get -u -v github.com/chennqqi/simpledns

configure example

see conf dir

usage

./simpledns -conf [configure uri]

docker

build: ./builddocker.sh

or pull: docker pull sort/simpledns

known issue

  • consul service not support udp check

with consul as backend

add a forward upstream in forwards section, see example

      - name: consul.
        cache_expire: 5m
        upstreams:
        - 'udp://127.0.0.1:8600'

with k8s/coredns as backend

     - name: cluster.local.
        cache_expire: 5m
        upstreams:
        - 'udp://xx.xx.xx.xx:53'

ping check

	servers: 
	- name: example.com.
	  v_zones:
	  - match_clients: [ "127.0.0.1/24" ]
	    file: 'conf/zones/t.example.com'
        checker: 'ping 10s' # every 10s check once

note: if after ping check, this was no one valid ipaddr. it will ignore check result, return all result.

TODO:

  • control api, support ddns
  • tcp dns service
  • multiplex tcp check and tcp dns service
  • add geo based zone query
  • performance test

License

Apache 2.0 license. See the LICENSE file for details.