mod_doh

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DnsMessage = "application/dns-message"
View Source
const (
	ModDoh = "mod_doh"
)

Variables

This section is empty.

Functions

func DnsMsgToResponse

func DnsMsgToResponse(req *bfe_basic.Request, msg *dns.Msg) (*bfe_http.Response, error)

func RequestToDnsMsg

func RequestToDnsMsg(req *bfe_basic.Request) (*dns.Msg, error)

Types

type ConfModDoh

type ConfModDoh struct {
	Basic struct {
		Cond string
	}

	Dns DnsConf

	Log struct {
		OpenDebug bool
	}
}

func ConfLoad

func ConfLoad(filePath string, confRoot string) (*ConfModDoh, error)

func (*ConfModDoh) Check

func (cfg *ConfModDoh) Check() error

type DnsClient

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

func NewDnsClient

func NewDnsClient(dnsConf *DnsConf) *DnsClient

func (*DnsClient) Fetch

func (c *DnsClient) Fetch(req *bfe_basic.Request) (*bfe_http.Response, error)

type DnsConf

type DnsConf struct {
	Address  string
	RetryMax int
	Timeout  int // In Millisecond.
}

type DnsFetcher

type DnsFetcher interface {
	Fetch(req *bfe_basic.Request) (*bfe_http.Response, error)
}

type ModuleDoh

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

func NewModuleDoh

func NewModuleDoh() *ModuleDoh

func (*ModuleDoh) Init

func (*ModuleDoh) Name

func (m *ModuleDoh) Name() string

type ModuleDohState

type ModuleDohState struct {
	DohRequest          *metrics.Counter
	DohRequestNotSecure *metrics.Counter
	FetchDnsErr         *metrics.Counter
}

Jump to

Keyboard shortcuts

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