This is a toy implmentation of a DNS resolver based on RFC 1035. During the implementation, I loosely followed and referenced Julia Evans' tutorial Implement DNS in a Weekend. The final output of the program is modelled after the output of the dig utility.
The basic usage of the resolver is as follows where <domain-name> is a valid
domain name according to RFC 1035 2.3.1:
rdns <domain-name>
The user can also specify the DNS server used to query from as follows where
<server-ip> is a valid IPV4 address:
rdns @<server-ip> <domain-name>
- A
- NS
- MD
- MF
- CNAME
- SOA
- MB
- MG
- MR
- NULL
- WKS
- PTR
- HINFO
- MINFO
- MX
- TXT
- AAAA (RFC 1886)
- Basic domain name resolution
- Request timeouts
- Caching
- Rich cli experience
- Selection of query type and class from cli
- Allowing multiple DNS servers to be specified from the cli