doh

package
v0.0.0-...-dd04f72 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Copyright (c) 2023 RethinkDNS and its authors.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Index

Constants

View Source
const (
	OptResourcePaddingCode = 12
	PaddingBlockSize       = 128 // RFC8467 recommendation
)

Variables

This section is empty.

Functions

func AddEdnsPadding

func AddEdnsPadding(rawMsg []byte) ([]byte, error)

Add EDNS padding, as defined in RFC7830, to a raw DNS message.

func NewOdohTransport

func NewOdohTransport(id, endpoint, target string, addrs []string, px ipn.Proxies, ctl protect.Controller) (dnsx.Transport, error)

NewTransport returns a POST-only Oblivious DoH transport. `id` identifies this transport. `endpoint` is the ODoH proxy that liasons with the target. `target` is the ODoH resolver. `addrs` is a list of IP addresses to bootstrap endpoint dialers. `px` is the proxy provider, never nil.

func NewTransport

func NewTransport(id, rawurl string, addrs []string, px ipn.Proxies, ctl protect.Controller) (dnsx.Transport, error)

NewTransport returns a POST-only DoH transport. `id` identifies this transport. `rawurl` is the DoH template in string form. `addrs` is a list of IP addresses to bootstrap dialers. `px` is the proxy provider, may be nil (eg for id == dnsx.Default)

Types

type ClientAuth

type ClientAuth interface {
	// GetClientCertificate returns the client certificate (if any).
	// May block as the first call may cause certificates to load.
	// Returns a DER encoded X.509 client certificate.
	GetClientCertificate() []byte
	// GetIntermediateCertificate returns the chaining certificate (if any).
	// It does not block or cause certificates to load.
	// Returns a DER encoded X.509 certificate.
	GetIntermediateCertificate() []byte
	// Request a signature on a digest.
	Sign(digest []byte) []byte
}

ClientAuth interface for providing TLS certificates and signatures.

Jump to

Keyboard shortcuts

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