Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.68 KB

README.md

File metadata and controls

58 lines (37 loc) · 1.68 KB

Iris

Build Status

Rudimentary DNS server implementation in Rust with support for the most common DNS record types. Written with the help of Emil Hernvall's DNS guide. Non-exhaustive tests are also provided.

The aim of this project was to learn about Rust and DNS protocols.

Demo

asciicast

Build Instructions

Rust (stable or nightly) needs to be installed. Then, run:

cargo build

For automated pre-commit/pre-push checks, a Lefthook script is included. Run lefthook install to initialize it.

How to Run

Run the server:

cargo run

Then, while the server is running, send a DNS query to port 2053:

dig @127.0.0.1 -p 2053 www.google.com

To run the provided tests:

cargo test

Links

Further Improvements

I've achieved what I wanted to with this project, but there are some further improvements that could be made:

  • Support replies larger than 512B (TCP connection support is necessary for this)
  • Concurrency
  • Start resolving using other servers than the A root server
  • Add support for hosting zones
  • Allow acting as an authoritative server
  • DNSSEC
  • Add support for more records (SOA, TXT, SRV, OPT)