Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
viktaur authored Jun 20, 2024
1 parent e2db7b6 commit 03d6b71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A simple low-level DNS resolver
This project consists of a DNS server written from scratch in Rust, based on RFCs 1034 and 1035. The server listens for a stream of bytes representing the DNS message on a UDP port, decodes it, looks for a resource record (RR) matching the query, and returns the encoded information back to the origin. The resource record is currently being held in records.json.
This project consists of a DNS server written from scratch in Rust, based on RFCs [1034](https://www.rfc-editor.org/rfc/rfc1034) and [1035](https://www.rfc-editor.org/rfc/rfc1035). The server listens for a stream of bytes representing the DNS message on a UDP port, decodes it, looks for a resource record (RR) matching the query, and returns the encoded information back to the origin. The resource record is currently being held in records.json.

The server can be run by passing the port as an argument. You can pick any as long as it's not being used or reserved.
```bash
Expand All @@ -11,13 +11,13 @@ Its functionality can be tested with a tool like `dig` on localhost and the spec
dig +retry=0 -p 1053 @127.0.0.1 +noedns example.com A
```
## Records
`A` records for amazon.co.uk stored in `records.json`.
`A` records for amazon.co.uk as stored in `records.json`.
<figure>
<img src="media/records-json.png" alt="" height="200" />
</figure>

## Input and output stream
Stream of bytes from the query and the response message sent back to the origin. As we can see, one response has been sent for each RR, which corresponds to the ones in `records.json`.
Stream of bytes from the query and the response messages transmitted. As we can see, the response bytes are based on the request and there's one answer for each RR, corresponding to the ones defined in `records.json`.
<figure>
<img src="media/server-logs.png" alt="" height="100" />
</figure>
Expand Down

0 comments on commit 03d6b71

Please sign in to comment.