An open API service indexing awesome lists of open source software.

https://github.com/mostafaahmed97/rootwalk

A tiny DNS resolver written in Go.
https://github.com/mostafaahmed97/rootwalk

dns dns-resolver go golang root-servers rootwalk

Last synced: 3 months ago
JSON representation

A tiny DNS resolver written in Go.

Awesome Lists containing this project

README

          

# rootwalk

[![Ceasefire Now](https://badge.techforpalestine.org/default)](https://techforpalestine.org/learn-more)

rootwalk is a tiny DNS resolver I wrote to learn more about how
DNS works and to practice writing Go. Read the blog post: https://mostafaahmed.hashnode.dev/series/building-a-dns-resolver-in-go-from-scratch

It's a simple recursive*
resolver using only the Go standard library. It's meant
to be used for educational purposes, you probably shouldn't depend
on this in production :D.

rootwalk's purpose is to resolve a domain name starting from the
root nameservers, it navigates the hierarchy of DNS nameservers
and outputs the resolution journey.

![](./docs/cycle.png)

* Recursive resolvers should support result caching
by definition, this is a limitation in rootwalk.

# Usage

```shell
go build
./rootwalk

# or
go run .
```
Where:
- `domain` is the domain name to be resolved.
- `root` a value between `a` - `m` specifying which root server
should be used, defaults to `a`.

# Output Example

![alt text](/docs/example.png)

# Limitations

- No caching
- Limited support for resource record types, only `A`, `AAA` and `NS` atm.