magicdns

package module
v0.0.0-...-a2194a0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

CoreDNS MagicDNS Plugin

[!IMPORTANT] This plugin is still actively being worked on.
Expect possible changes or reworks of how this plugin functions and how the config is structured.

Additionally, this README isn't always up-to-date, so not everything mentioned here might work as described.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvOrDefault

func GetEnvOrDefault(key, defaultvalue string) string

func HandleError

func HandleError(request *dns.Msg, rcode int, writer dns.ResponseWriter, e error) (int, error)

func HandleNXDomain

func HandleNXDomain(qname string, request *dns.Msg, writer dns.ResponseWriter) (int, error)

func LoadEnvFile

func LoadEnvFile(path string) error

func LoadMagicDNSConfig

func LoadMagicDNSConfig(c *caddy.Controller, config *MagicDNSConfig) error

func PrepareResponseRcode

func PrepareResponseRcode(request *dns.Msg, rcode int, recursionAvailable bool) *dns.Msg

func PrepareResponseReply

func PrepareResponseReply(request *dns.Msg, recursionAvailable bool) *dns.Msg

Types

type MagicDNSConfig

type MagicDNSConfig struct {
	Domain string
}

func CreateMagicDNSConfig

func CreateMagicDNSConfig(c *caddy.Controller) (*MagicDNSConfig, error)

type MagicDNSPlugin

type MagicDNSPlugin struct {
	Next   plugin.Handler
	Config *MagicDNSConfig
}

func CreatePlugin

func CreatePlugin(c *caddy.Controller) (*MagicDNSPlugin, error)

func (MagicDNSPlugin) Name

func (plug MagicDNSPlugin) Name() string

func (MagicDNSPlugin) ServeDNS

func (plug MagicDNSPlugin) ServeDNS(ctx context.Context, writer dns.ResponseWriter, r *dns.Msg) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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