Documentation ¶
Index ¶
- Constants
- Variables
- func HTTP(m *dns.Msg, tlsConfig *tls.Config, server, userAgent, method string, ...) (*dns.Msg, error)
- func ODoH(query dns.Msg, target, proxy string) (*dns.Msg, error)
- func Plain(m *dns.Msg, server string, preferTCP bool, timeout time.Duration, ...) (*dns.Msg, error)
- func QUIC(msg *dns.Msg, server string, tlsConfig *tls.Config, ...) (*dns.Msg, error)
- func TLS(msg *dns.Msg, server string, tlsConfig *tls.Config, ...) (*dns.Msg, error)
Constants ¶
View Source
const ( DoQNoError = 0x0 // No error. This is used when the connection or stream needs to be closed, but there is no error to signal. DoQInternalError = 0x1 // The DoQ implementation encountered an internal error and is incapable of pursuing the transaction or the connection. DoQProtocolError = 0x2 // The DoQ implementation encountered a protocol error and is forcibly aborting the connection. DoQRequestCancelled = 0x3 // A DoQ client uses this to signal that it wants to cancel an outstanding transaction. DoQExcessiveLoad = 0x4 // A DoQ implementation uses this to signal when closing a connection due to excessive load. DoQUnspecifiedError = 0x5 // A DoQ implementation uses this in the absence of a more specific error code. DoQErrorReserved = 0xd098ea5e // Alternative error code used for tests. )
DoQ Error Codes https://datatracker.ietf.org/doc/html/rfc9250#section-8.4
View Source
const ODoHContentType = "application/oblivious-dns-message"
Variables ¶
View Source
var (
DoQALPNTokens = []string{"doq"}
)
Functions ¶
func HTTP ¶
func HTTP( m *dns.Msg, tlsConfig *tls.Config, server, userAgent, method string, timeout, handshakeTimeout time.Duration, h3, noPMTUD bool) (*dns.Msg, error)
HTTP makes a DNS query over HTTP(s)
func Plain ¶
func Plain(m *dns.Msg, server string, preferTCP bool, timeout time.Duration, udpBuffer uint16) (*dns.Msg, error)
Plain makes a DNS query over TCP or UDP (with TCP fallback)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.