chaos

package
v0.5.26 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

README

Name

chaos - respond to TXT queries in the CH class

Description

This is useful for retrieving version or author information from the server by querying a TXT record for a special domain name in the CH class.

Syntax

chaos [VERSION] {
    authors {
        "First Author"
        "Second Author"
        ...
    }
}
  • VERSION is the version to return. Defaults to atomdns-<version>, if not set.
  • The authors section holds the authors that are returned.

Note that you have to make sure that this handler will get actual queries for the following zone prefixes: version., authors., hostname. and id., i.e. having version.example.org will suffice to get queries for the version. prefix.

Examples

Specify all the zones:

version.bind version.server authors.bind hostname.bind id.server {
    chaos atomdns-001
        authors {
            info@example.org
        }
    }
}

And test with dig:

% dig @localhost CH TXT version.bind

;; ANSWER SECTION:
version.bind.		0	CH	TXT	"atomdns-001"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err added in v0.5.2

func Err(err error) slog.Attr

Types

type Chaos

type Chaos struct {
	Version string
	Authors []string
}

Chaos allows atomdns to reply to CH TXT queries and return author or version information. If the name starts with "authors." the authors are returned if with "version." the version is returned.

func (*Chaos) Err

func (h *Chaos) Err(err error) error

func (*Chaos) HandlerFunc

func (c *Chaos) HandlerFunc(next dns.HandlerFunc) dns.HandlerFunc

func (*Chaos) Key

func (h *Chaos) Key() string

func (*Chaos) Setup

func (c *Chaos) Setup(co *dnsserver.Controller) error

Jump to

Keyboard shortcuts

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