A DNS resolver implemented in Rust, designed to handle DNS queries efficiently. This project showcases the power of Rust in building network services with safety, speed, and concurrency.
- Fast DNS query resolution
- Modular design for easy extension
- Lightweight and memory-efficient
- Written in Rust for performance and safety
To build and run this project, you'll need Rust installed. You can install Rust by following the instructions on the official website.
Clone the repository:
git clone https://github.com/divy-sh/rdns-resolver-rs.git
cd rdns-resolver-rsThen, build the project:
cargo build --releaseOnce the build is complete, go to the following directory.
rdns-resolver-rs/target/release/To start the DNS resolver, run the following command.
./rdns_resolver_rsThe server will start listening on the port (2053). You can configure the server port by changing the REQ_PORT in utils.rs.
To send a query to the server, run the following command in a new terminal window.
dig @[IP ADDR] -p [PORT] [www.test.com]- Figure out why some of the root name servers don't respond.
- generalize the code by extracting the placeholder configurations out of the code, into a config file.
- Implement concurrency, but since the project was meant for learning how dns resolvers work, it may or may not work properly and may produce unexpected results.
- Add remaining tests for LRU Cache implementation.
- Implement DNS name compression
- Fix REFUSED RCODE on querying some addresses that return CNAME.