dnsserver

command
v0.0.0-...-3d6e8ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

Simple DNS Server implemented in Go

The Domain Name System (DNS) consists of multiple elements: Authoritative DNS Servers store and provide DNS record information, Recursive DNS servers (also referred to as caching DNS servers) are the "middlemen" that recursively look up information on behalf of an end-user. See Authoritative vs. Recursive DNS Servers: What's The Difference for an overview.

This project provides a subset of the functionality of an Authoritative DNS Server as a study project. If you need a production-grade DNS Server in Go, have a look at CoreDNS. For DNS library support, see Go DNS or package dnsmessage.

Featured on r/golang and go-nuts.

Simple DNS Server implemented in Go

Run

$ go run . &
Listening at:  :1053

$ dig example.com @localhost -p 1053
Received request from  [::1]:63282

; <<>> DiG 9.10.6 <<>> example.com @localhost -p 1053
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17060
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;example.com.			IN	A

;; ANSWER SECTION:
example.com.		31337	IN	A	3.1.3.7

;; Query time: 0 msec
;; SERVER: ::1#1053(::1)
;; WHEN: Mon Jun 17 17:02:43 CEST 2019
;; MSG SIZE  rcvd: 56

Concepts

TODO

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL