Debian Codegraph @

cmd/atomdns/handlers/whoami/README.md

raw
1 # Name
2
3 _whoami_ - return your resolver's local IP address, port and transport
4
5 # Description
6
7 The _whoami_ handler is not really that useful, but can be used for having a simple (fast) endpoint
8 to test clients against. When _whoami_ returns a response it will have your client's IP address in
9 the additional section as either an A or AAAA record.
10
11 The reply always has an empty answer section. The port and transport are included in the additional
12 section as a SRV record, network can be "tcp" or "udp".
13
14 If the _ecs_ handler added an address to the context, _that_ address is used instead.
15
16 ```txt
17 ._<network>.qname. 0 IN SRV 0 0 <port> .
18 ```
19
20 The _whoami_ handler will respond to every A or AAAA query, regardless of the query name.
21
22 # Syntax
23
24 ```txt
25 whoami
26 ```
27
28 # Examples
29
30 Start a server on the default port and load the _whoami_ handler.
31
32 ```conffile
33 example.org {
34 whoami
35 }
36 ```
37
38 When queried for "example.org A", atomdns will respond with:
39
40 ```txt
41 ;; QUESTION SECTION:
42 ;example.org. IN A
43
44 ;; ADDITIONAL SECTION:
45 example.org. 0 IN A 10.240.0.1
46 _udp.example.org. 0 IN SRV 0 0 40212
47 ```