dnsoverhttps

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package dnsoverhttps implements DNS over HTTPS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

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

Transport is a DNS over HTTPS modelx.DNSRoundTripper.

As a known bug, this implementation does not cache the domain name in the URL for reuse, but this should be easy to fix.

func NewTransport

func NewTransport(client *http.Client, URL string) *Transport

NewTransport creates a new Transport

func (*Transport) Address

func (t *Transport) Address() string

Address returns the upstream server address.

func (*Transport) Network

func (t *Transport) Network() string

Network returns the transport network (e.g., doh, dot)

func (*Transport) RequiresPadding

func (t *Transport) RequiresPadding() bool

RequiresPadding returns true for DoH according to RFC8467

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(ctx context.Context, query []byte) (reply []byte, err error)

RoundTrip sends a request and receives a response.

Jump to

Keyboard shortcuts

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