mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-15 15:52:35 +02:00
32-incorporate-dns
Incorporated a DNS server. A DNS server can be run to resolve host names.
This commit is contained in:
18
cmd/dns/main.go
Normal file
18
cmd/dns/main.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user