initial commit

This commit is contained in:
Jordan Whited
2020-05-09 16:47:41 -07:00
commit 9cf6a70617
4 changed files with 596 additions and 0 deletions

23
wgsd.go Normal file
View File

@@ -0,0 +1,23 @@
package wgsd
import (
"context"
"github.com/coredns/coredns/plugin"
"github.com/miekg/dns"
)
// WGSD is a CoreDNS plugin that provides Wireguard peer information via DNS-SD
// semantics. WGSD implements the plugin.Handler interface.
type WGSD struct {
Next plugin.Handler
}
func (w *WGSD) ServeDNS(ctx context.Context, rw dns.ResponseWriter,
msg *dns.Msg) (int, error) {
return plugin.NextOrFailure(w.Name(), w.Next, ctx, rw, msg)
}
func (w *WGSD) Name() string {
return "wgsd"
}