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

20
setup.go Normal file
View File

@@ -0,0 +1,20 @@
package wgsd
import (
"github.com/caddyserver/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
)
func init() {
plugin.Register("wgsd", setup)
}
func setup(c *caddy.Controller) error {
// Add the Plugin to CoreDNS, so Servers can use it in their plugin chain.
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
return &WGSD{Next: next}
})
return nil
}