xfr

package
v0.8.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package xfr implements DNS zone transfer (AXFR/IXFR) clients over TLS (RFC 9103) and plain TCP (RFC 5936).

AXFR (RFC 5936) transfers a complete zone as a stream of DNS messages. The client sends a single AXFR query, and the server responds with one or more DNS messages containing the zone's resource records. The first message begins with the zone's SOA record, and the last message ends with the same SOA record.

XFR-over-TLS (RFC 9103) mandates TLS 1.3 on port 853, reusing the DNS-over-TLS (DoT) transport. Plain TCP on port 53 is supported for legacy compatibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AXFR

func AXFR(ctx context.Context, cfg ClientConfig) ([]dns.ResourceRecord, error)

AXFR performs a full zone transfer (AXFR) and returns all resource records in the zone. The transfer uses the configured transport (TLS or plain TCP).

Types

type ClientConfig

type ClientConfig struct {
	// PrimaryAddr is the address of the primary DNS server from which
	// to transfer the zone, e.g. "10.0.0.1:853" or "ns1.example.com".
	// If empty, ":853" is assumed and the zone name is used to look up
	// the primary server via DNS (not implemented yet).
	PrimaryAddr string
	// Zone is the name of the zone to transfer, e.g. "example.com".
	Zone string
	// Timeout is the per-message read/write deadline.
	Timeout time.Duration
	// UseTLS enables TLS transport (RFC 9103). When true, the client
	// connects via TLS to the primary on port 853. When false, plain
	// TCP on port 53 is used (RFC 5936).
	UseTLS bool
	// InsecureSkipVerify controls whether TLS certificate verification
	// is skipped. Should only be used for testing.
	InsecureSkipVerify bool
}

ClientConfig configures an XFR client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL