mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	* Doc updates Make the name section fit on one line. Signed-off-by: Miek Gieben <miek@miek.nl> * Regen docs Signed-off-by: Miek Gieben <miek@miek.nl>
		
			
				
	
	
		
			74 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
			
		
		
	
	
			74 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
| .\" generated with Ronn/v0.7.3
 | |
| .\" http://github.com/rtomayko/ronn/tree/0.7.3
 | |
| .
 | |
| .TH "COREDNS\-WHOAMI" "7" "July 2018" "CoreDNS" "CoreDNS plugins"
 | |
| .
 | |
| .SH "NAME"
 | |
| \fIwhoami\fR \- returns your resolver\'s local IP address, port and transport\.
 | |
| .
 | |
| .SH "DESCRIPTION"
 | |
| The \fIwhoami\fR plugin is not really that useful, but can be used for having a simple (fast) endpoint to test clients against\. When \fIwhoami\fR returns a response it will have your client\'s IP address in the additional section as either an A or AAAA record\.
 | |
| .
 | |
| .P
 | |
| 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"\.
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| \&\._<transport>\.qname\. 0 IN SRV 0 0 <port> \.
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| The \fIwhoami\fR plugin will respond to every A or AAAA query, regardless of the query name\.
 | |
| .
 | |
| .P
 | |
| If CoreDNS can\'t find a Corefile on startup this is the \fIdefault\fR 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"
 | |
| .
 | |
| .nf
 | |
| 
 | |
| whoami
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .SH "EXAMPLES"
 | |
| Start a server on the default port and load the \fIwhoami\fR plugin\.
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| \&\. {
 | |
|     whoami
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| When queried for "example\.org A", CoreDNS will respond with:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .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
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .SH "SEE ALSO"
 | |
| Read the blog post \fIhttps://coredns\.io/2017/03/01/how\-to\-add\-plugins\-to\-coredns/\fR on how this plugin is built, or explore the source code \fIhttps://github\.com/coredns/coredns/blob/master/plugin/whoami/\fR\.
 |