Konrad NeitzelandCursor c2cdd85ef1 Raise the module Go version to 1.27.0.
Match the Workspace pin so language and stdlib features through 1.27 are allowed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 17:16:16 +02:00
2026-09-20 17:16:16 +02:00

go-dns

Shared Go library for authoritative DNS against BIND-compatible nameservers: full zone transfer (AXFR) and RFC 2136 dynamic UPDATE, authenticated with caller-supplied TSIG.

Import: gitea.neitzel.de/konrad/go-dns (package godns).

go get gitea.neitzel.de/konrad/go-dns

Scope

Included

  • Session (Client) — one nameserver + zone + TSIG key
  • AXFR — full zone read over TCP
  • RFC 2136 UPDATE — typed add/delete changes (UDP with TCP fallback)
  • TSIG — caller-supplied key name, algorithm, and base64 secret
  • Typed RR builders — A, AAAA, MX, TXT, CNAME, NS, SRV, PTR, CAA (ASCII names)
  • Zone / RRSet / Record — in-memory zone model from AXFR

Excluded

  • IXFR / incremental transfer
  • TSIG key generation or BIND config writing (see docs for operator notes)
  • DNSSEC signing / validation as a product feature
  • Non-ASCII / IDN domain names (v1)

Usage

key := godns.TSIG{
    Name:      "exapp-key.",
    Algorithm: "hmac-sha256",
    Secret:    "base64-secret-from-bind",
}
client, err := godns.NewClient("ns.example:53", "example.com.", key)

// AXFR
tr, err := client.AXFR(ctx)

// UPDATE
rec, err := godns.A("www.example.com.", 300, net.ParseIP("192.0.2.10"))
_, err = client.Update(ctx, godns.Add(rec))

Runnable package examples (construction only, no live nameserver): go test -run Example.

Domain language

See CONTEXT.md for Session, Zone / RRSet / Record, UPDATE, AXFR, and TSIG key terminology.

Testing

Unit tests cover message construction and record builders. Optional BIND integration tests live behind build tags / env (see bind_integration_test.go).

S
Description
DNS Library for go
Readme
117 KiB
Languages
Go 100%