Skip to content

Repository files navigation

G53

Build Status Build Status Coverage Status codebeat badge Go Report Card

Build

Building without docker:
export GOPATH=/tmp/go
export PATH=${PATH}:${GOPATH}/bin
go get -v github.com/tools/godep
go get -d -v github.com/hawkingrei/g53
cd ${GOPATH}/src/github.com/hawkingrei/g53
godep restore
cd ${GOPATH}/src/github.com/hawkingrei/g53/
make all
Building with docker:
wget https://raw.githubusercontent.com/hawkingrei/G53/master/Dockerfile
sudo docker build -t g53 .
sudo docker run -d -p 80:80 -p 53:53/udp  g53

HTTP API

# show all active services
curl http://<host>:<ip>/services

# add new service manually
curl http://<host>:<ip>/service -X PUT --data-ascii '{"RecordType":"A","Value":"127.0.0.1","TTL":3600,"Aliases":"c.d.net"}'

# get a service 
curl http://<host>:<ip>/service -X GET  --data-ascii '{"RecordType":"A","Aliases":"c.d.net"}'

# remove a service
curl http://<host>:<ip>/service  -X DELETE '{"RecordType":"A","Value":"127.0.0.1","TTL":3600,"Aliases":"c.d.net"}'

# set new default TTL value
curl http://<host>:<ip>/set/ttl -X PUT --data-ascii '10'

# get version information
curl http://<host>:<ip>/version

To do

  • Support tls
  • Update restful
  • Update document
  • Add lock-free cache

About

a dns service with restful api (support private domain)/ 一个带restuful接口的dns服务器(支持内部域名)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages