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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址