_____ _____ _ / ____| | __ \ | | | | __ ___ | |__) |___ ___ ___ | |_ _____ | | |_ |/ _ \| _ // _ \/ __|/ _ \| \ \ / / _ \ | |__| | (_) | | \ \ __/\__ \ (_) | |\ V / __/ \_____\___/|_| \_\___||___/\___/|_| \_/ \___| GoResolve — DNS Server GoResolve is a lightweight, educational DNS server written in Go that demonstrates how DNS works at the wire level. It parses DNS packets manually, supports recursive forwarding, and runs as a UDP server on port 2053.
This project focuses on:
- Understanding DNS packet structure
- Working with UDP sockets
- Implementing a recursive DNS forwarder
- Writing clean, inspectable Go networking code
- 🧠 Manual DNS packet parsing (no external DNS libs)
- 🌐 UDP-based DNS server (
0.0.0.0:2053) - 🔁 Recursive forwarding to upstream resolvers
- 🧪 Works on Windows + WSL + Linux
- 🧾 Structured logs with ASCII startup banner
- ⚡ Lightweight single-binary design
_____ _____ _ / ____| | __ \ | | | | __ ___ | |__) |___ ___ ___ | |_ _____ | | |_ |/ _ \| _ // _ \/ __|/ _ \| \ \ / / _ \ | |__| | (_) | | \ \ __/\__ \ (_) | |\ V / __/ \_____\___/|_| \_\___||___/\___/|_| \_/ \___| GoResolve — DNS Server ──────────────────────────────────────── Mode : Recursive DNS Listening: 0.0.0.0:2053 Protocol : UDP ──────────────────────────────────────── Received 51 bytes from 172.30.45.134:56015 question #0 {Name:[google com] Type:1 Class:1} forward request for google.com ip route | grep default # -> default via 172.30.32.1 dig @172.30.32.1 -p 2053 google.com;; ANSWER SECTION: google.com. 60 IN A 142.250.xxx.xxx go build -o goresolve ./app./goresolve -resolver 8.8.8.8:53dig @172.30.32.1 -p 2053 google.com
⚠️ Windowsnslookupcannot use custom ports. Use WSL + dig instead.
| Flag | Description | Example |
|---|---|---|
-resolver | Upstream DNS server | 8.8.8.8:53 |
If no resolver is provided, GoResolve responds with a default IPv4 address (8.8.8.8).
GoResolve/ ├── app/ │ └── main.go ├── .github/ │ └── workflows/ │ ├── ci.yml │ └── release.yml ├── go.mod ├── README.md └── LICENSE This project demonstrates:
- DNS protocol internals
- UDP networking in Go
- Binary packet parsing
- Recursive DNS resolution
- WSL ↔ Windows networking
- Clean CLI-style logging
Dheeraj Appaji Computer Science Student • Systems & Networking Enthusiast
GitHub: @AppajiDheeraj