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
- func AddEdnsPadding(rawMsg []byte) ([]byte, error)
- func NewOdohTransport(id, endpoint, target string, addrs []string, px ipn.Proxies, ...) (dnsx.Transport, error)
- func NewTransport(id, rawurl string, addrs []string, px ipn.Proxies, ctl protect.Controller) (dnsx.Transport, error)
- type ClientAuth
Constants ¶
const ( OptResourcePaddingCode = 12 PaddingBlockSize = 128 // RFC8467 recommendation )
Variables ¶
This section is empty.
Functions ¶
func AddEdnsPadding ¶
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.