forward_dnsproxy

package module
v0.0.0-...-61b1fae Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

README

mosdns-dnsproxy

bridage the request to dnsproxy as a upstream

Documentation

Index

Constants

View Source
const PluginType = "forward_dnsproxy"

Variables

This section is empty.

Functions

func Init

func Init(_ *coremain.BP, args any) (any, error)

Types

type Args

type Args struct {
	// options for dnsproxy upstream
	Upstreams          []UpstreamConfig `yaml:"upstreams"`
	InsecureSkipVerify bool             `yaml:"insecure_skip_verify"`
	Bootstrap          []string         `yaml:"bootstrap"`
}

type Forward

type Forward struct {
	// contains filtered or unexported fields
}

func NewForward

func NewForward(args *Args) (*Forward, error)

NewForward returns a Forward with given args. args must contain at least one upstream.

func (*Forward) Close

func (f *Forward) Close() error

func (*Forward) Exchange

func (f *Forward) Exchange(ctx context.Context, q *dns.Msg) (*dns.Msg, upstream.Upstream, error)

func (*Forward) Exec

func (f *Forward) Exec(ctx context.Context, qCtx *query_context.Context) error

type UpstreamConfig

type UpstreamConfig struct {
	Addr    string   `yaml:"addr"`
	IPAddrs []string `yaml:"ip_addrs"`
}

Jump to

Keyboard shortcuts

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