doq

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolError = 0x2
	NoError       = 0x0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseWriter

type ResponseWriter struct {
	dns.ResponseWriter

	Conn   *quic.Conn
	Stream *quic.Stream
}

ResponseWriter implements dns.ResponseWriter for DNS-over-QUIC.

func (*ResponseWriter) Close

func (w *ResponseWriter) Close() error

func (*ResponseWriter) Hijack added in v1.5.3

func (w *ResponseWriter) Hijack()

(*ResponseWriter).Hijack hijack implements dns.ResponseWriter.Hijack.

func (*ResponseWriter) LocalAddr

func (w *ResponseWriter) LocalAddr() net.Addr

func (*ResponseWriter) RemoteAddr

func (w *ResponseWriter) RemoteAddr() net.Addr

func (*ResponseWriter) Write

func (w *ResponseWriter) Write(m []byte) (int, error)

func (*ResponseWriter) WriteMsg

func (w *ResponseWriter) WriteMsg(m *dns.Msg) error

type Server

type Server struct {
	Addr    string
	Handler dns.Handler
	// contains filtered or unexported fields
}

Server implements DNS-over-QUIC server.

func (*Server) ListenAndServeQUIC

func (s *Server) ListenAndServeQUIC(tlsCert, tlsKey string) error

func (*Server) ListenAndServeQUICWithConfig added in v1.6.0

func (s *Server) ListenAndServeQUICWithConfig(tlsConfig *tls.Config) error

ListenAndServeQUICWithConfig serves with a custom TLS config, binding a new UDP socket at s.Addr. Prefer Serve when the caller already holds a pre-bound socket (e.g. for SO_REUSEPORT or synchronous bind-error reporting).

func (*Server) Serve added in v1.6.4

func (s *Server) Serve(pc net.PacketConn, tlsConfig *tls.Config) error

Serve accepts DoQ connections on a pre-bound UDP PacketConn. It is the preferred entry point when the caller controls the socket lifecycle.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Jump to

Keyboard shortcuts

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