LEW21 / dns-api-go

A golang port of dns-api.org

Home Page:https://dns-api.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis CI Go Report Card license Release

dns-api-go

This is a golang port of the old perl-based DNS-API.org site.

  • Still allows the same lookups.
  • Still has rate-limiting.

Missing features:

  • TTL on records
    • Because I couldn't find a decent DNS library.

Installation

You can install the project like so:

$ go get github.com/skx/dns-api-go

Rate Limiting

The server has support for rate-limiting, you can enable this by passing the address of a redis server to the binary:

$ ./dns-api-go  -redis-server localhost:6379

If this flag is not present then rate-limiting will be disabled.

Notes

The main page dynamically includes the domain-name under which it was reached, so we can deploy it automatically even on other sites.

Hacking

If you update the files beneath data/ you need to rebuild the bindata.go file before they will become visible.

First of all install the go-bindata tool if you don't already have it:

 $ go get -u github.com/jteeuwen/go-bindata/...

Now you can rebuild like so:

 $ go-bindata -nomemcopy data/
 $ go build .

Steve

About

A golang port of dns-api.org

https://dns-api.org/

License:GNU General Public License v2.0


Languages

Language:Go 58.8%Language:HTML 31.1%Language:Shell 5.7%Language:Makefile 4.4%