mod_doh

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 17 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.

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