godnsagent is a simple DNS server which downloads zones over HTTP(S) in JSON format, parses them, stores them in memory and serves to clients.
git clone https://github.com/DevelopersPL/godnsagent.git
cd godnsagent
go get
go build -ldflags "-X main.buildtime '`date`' -X main.buildver '`git log --pretty=format:'%h' -n 1`'"
-z defines address of DNS zones. Defaults to empty.-l defines the local IP (interface) to listen on. Defaults to all.-r enable recursive querying of specified servers for answers godnsagent can't provide itself.-k sets the API key (passed as GET or form value "key" to http notification handlers)-lf sets the logger flags (integer): https://golang.org/pkg/log/#pkg-constants--https configures the http server to use https. Defaults to true.--zones-reload-interval defines the interval in seconds to reload the DNS zones or disables auto reload if set to 0. Defaults to 0../godnsagent -z https://example.org/path/to/zones.json -l 127.0.0.1 -r 8.8.8.8:53 -k secretkeyhere
{
"example.com.": [
{"name": "example.com.", "type": "A", "tTl": 500, "data": "123.123.123.123"},
{"name": "b.example.com.", "type": "A", "Class": "CH", "Ttl": 300, "data": "123.123.123.124"},
{"name": "example.com", "type": "MX", "Class": "IN", "Ttl": 305, "data": "5 email.example.net."},
{"name": "example.com", "type": "NS", "data": "marley.example.com."},
{"name": "example.com", "type": "NS", "Class": "IN", "Ttl": 300, "data": "abc.example.com."},
{"name": "example.com", "type": "SOA", "TTL": 300, "data": "abc.example.com. hostmaster.example.com. 1399838297 21600 3600 1814400 300"}
],
"example.net.": [
{"name": "example.net.", "type": "A", "tTl": 500, "data": "123.123.123.123"},
{"name": "b.example.net.", "type": "A", "Class": "CH", "Ttl": 300, "data": "123.123.123.125"},
{"name": "example.net", "type": "MX", "Class": "IN", "Ttl": 305, "data": "5 email.example.net."},
{"name": "example.net", "type": "NS", "data": "marley.example.net."},
{"name": "example.net", "type": "NS", "Class": "IN", "Ttl": 300, "data": "abc.example.net."},
{"name": "abc.example.net", "type": "A", "data": "123.123.123.100"},
{"name": "def.example.net", "type": "A", "data": "123.123.123.101"},
{"name": "example.net", "type": "SOA", "TTL": 300, "data": "def.example.net. hostmaster.example.net. 1399838297 21600 3600 1814400 300"}
]
}
This software was created thanks to two amazing projects:
Content type
Image
Digest
Size
16.9 MB
Last updated
over 6 years ago
docker pull lolhens/godnsagent