google

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultProvides is default provides
	DefaultProvides = iota
)

Variables

View Source
var (
	// Upstream is DoH query upstream
	Upstream = map[int]string{
		DefaultProvides: "https://dns.google.com/resolve",
	}
)

Functions

func Author

func Author() string

Author returns package author

func License

func License() string

License returns package license

func Version

func Version() string

Version returns package version

Types

type Provider

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

Provider is a DoH provider client

func New

func New() *Provider

New returns a new google provider client

func (*Provider) ECSQuery

func (c *Provider) ECSQuery(ctx context.Context, d dns.Domain, t dns.Type, s dns.ECS) (*dns.Response, error)

ECSQuery do DoH query with the edns0-client-subnet option

func (*Provider) Query

func (c *Provider) Query(ctx context.Context, d dns.Domain, t dns.Type) (*dns.Response, error)

Query do DoH query

func (*Provider) SetProvides

func (c *Provider) SetProvides(p int) error

SetProvides set upstream provides type, google does NOT supported

func (*Provider) String

func (c *Provider) String() string

String returns string of provider

Jump to

Keyboard shortcuts

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