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.
- Host: GitHub
- URL: https://github.com/mostafaahmed97/rootwalk
- Owner: mostafaahmed97
- License: gpl-3.0
- Created: 2024-09-29T22:12:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-15T13:44:14.000Z (over 1 year ago)
- Last Synced: 2026-01-14T13:46:32.045Z (5 months ago)
- Topics: dns, dns-resolver, go, golang, root-servers, rootwalk
- Language: Go
- Homepage:
- Size: 689 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rootwalk
[](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.

* 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

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