coredns/man/coredns-whoami.7
Miek Gieben f8aa208cc0
docs: Regenerate all manpages using mmark ()
Mmark recently became able to create manual pages. This removed the
dependency on 'ronn' and just uses mmark (Go program).

Re-hookup Makefile.doc to generate the correct header mmark needs to
see and regenate them all.

Spot checking a few pages suggest they look good and actually better
than rendered with ronn, esp. lists in lists.

Fixes 

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-04-06 08:42:40 +01:00

83 lines
1.7 KiB
Groff

.\" Generated by Mmark Markdown Processer - mmark.nl
.TH "COREDNS-WHOAMI" "7" "April 2019" "CoreDNS" "CoreDNS Plugins"
.SH WHOAMI
.SH NAME
.PP
\fIwhoami\fP - returns your resolver's local IP address, port and transport.
.SH DESCRIPTION
.PP
The \fIwhoami\fP plugin is not really that useful, but can be used for having a simple (fast) endpoint
to test clients against. When \fIwhoami\fP returns a response it will have your client's IP address in
the additional section as either an A or AAAA record.
.PP
The reply always has an empty answer section. The port and transport are included in the additional
section as a SRV record, transport can be "tcp" or "udp".
.PP
.RS
.nf
\&.\_<transport>.qname. 0 IN SRV 0 0 <port> .
.fi
.RE
.PP
The \fIwhoami\fP plugin will respond to every A or AAAA query, regardless of the query name.
.PP
If CoreDNS can't find a Corefile on startup this is the \fIdefault\fP plugin that gets loaded. As such
it can be used to check that CoreDNS is responding to queries. Other than that this plugin is of
limited use in production.
.SH SYNTAX
.PP
.RS
.nf
whoami
.fi
.RE
.SH EXAMPLES
.PP
Start a server on the default port and load the \fIwhoami\fP plugin.
.PP
.RS
.nf
\&. {
whoami
}
.fi
.RE
.PP
When queried for "example.org A", CoreDNS will respond with:
.PP
.RS
.nf
;; QUESTION SECTION:
;example.org. IN A
;; ADDITIONAL SECTION:
example.org. 0 IN A 10.240.0.1
\_udp.example.org. 0 IN SRV 0 0 40212
.fi
.RE
.SH SEE ALSO
.PP
Read the blog post
\[la]https://coredns.io/2017/03/01/how-to-add-plugins-to-coredns/\[ra] on how this plugin is built, or explore the source code
\[la]https://github.com/coredns/coredns/blob/master/plugin/whoami/\[ra].