32-incorporate-dns

Incorporated a DNS server. A DNS server can be run to resolve host
names.
This commit is contained in:
Tim Beatham
2023-11-24 15:04:07 +00:00
parent f28ed8260d
commit d1a74a7b95
5 changed files with 164 additions and 2 deletions

18
cmd/dns/main.go Normal file
View File

@ -0,0 +1,18 @@
package main
import (
"log"
smegdns "github.com/tim-beatham/wgmesh/pkg/dns"
)
func main() {
server, err := smegdns.NewDns(53)
if err != nil {
log.Fatal(err.Error())
}
defer server.Close()
server.Listen()
}