app

package
v0.0.0-...-54b8dd8 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUDPPort is ...
	DefaultUDPPort = 53
	// DefaultTCPPort is ...
	DefaultTCPPort = 53
	// DefaultTLSPort is ...
	DefaultTLSPort = 853
	// DefaultQuicPort is ...
	DefaultQuicPort = 853
)
View Source
const CaddyAppID = "dnsproxy"

CaddyAppID is ...

View Source
const NextProtoDQ = "doq-i02"

NextProtoDQ is the ALPN token for DoQ. During connection establishment, DNS/QUIC support is indicated by selecting the ALPN token "dq" in the crypto handshake. Current draft version: https://datatracker.ietf.org/doc/html/draft-ietf-dprive-dnsoquic-02

Variables

This section is empty.

Functions

This section is empty.

Types

type AdGuard

type AdGuard struct {
	// Server is ...
	Server string `json:"server"`
	// Bootstrap is ...
	Bootstrap string `json:"bootstrap,omitempty"`
	// Timeout is ...
	Timeout caddy.Duration `json:"timeout,omitempty"`
	// Upstream is ...
	upstream.Upstream `json:"-,omitempty"`
}

AdGuard is ...

func (AdGuard) CaddyModule

func (AdGuard) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*AdGuard) Provision

func (m *AdGuard) Provision(ctx caddy.Context) error

Provision is ...

type App

type App struct {
	// Handlers is ...
	Handlers []struct {
		// UpstreamRaw is ...
		UpstreamRaw json.RawMessage `json:"upstream" caddy:"namespace=dnsproxy.upstreams inline_key=upstream"`
		// MatchersRaw is ...
		MatchersRaw []json.RawMessage `json:"match" caddy:"namespace=dnsproxy.matchers inline_key=matcher"`
	} `json:"handlers"`
	// ListenUDP is ...
	ListenUDP int `json:"udp,omitempty"`
	// ListenTCP is ...
	ListenTCP int `json:"tcp,omitempty"`
	// ListenTLS is ...
	ListenTLS int `json:"tls,omitempty"`
	// ListenQuic is ...
	ListenQuic int `json:"quic,omitempty"`
	// Servers is ...
	Servers []string `json:"servers,omitempty"`
	// contains filtered or unexported fields
}

App is ...

func (App) CaddyModule

func (App) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*App) Cleanup

func (app *App) Cleanup() error

Cleanup is ...

func (*App) Exchange

func (app *App) Exchange(in *dns.Msg) (*dns.Msg, error)

Exchange is ...

func (*App) Logger

func (app *App) Logger() *zap.Logger

Logger is ...

func (*App) Provision

func (app *App) Provision(ctx caddy.Context) error

Provision is ...

func (*App) Start

func (app *App) Start() error

Start is ...

func (*App) Stop

func (app *App) Stop() error

Stop is ...

type Cache

type Cache struct {
	UpstreamRaw json.RawMessage `json:"upstream" caddy:"namespace=dnsproxy.upstreams inline_key=upstream"`
	// contains filtered or unexported fields
}

Cache is ...

func (Cache) CaddyModule

func (Cache) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*Cache) Exchange

func (m *Cache) Exchange(in *dns.Msg) (*dns.Msg, error)

Exchange is ...

func (*Cache) Provision

func (m *Cache) Provision(ctx caddy.Context) error

Provision is ...

type Const

type Const struct {
	// Type is ...
	Type string `json:"type,omitempty"`
	// Name is ...
	Name string `json:"name"`
	// contains filtered or unexported fields
}

Const is ...

func (Const) CaddyModule

func (Const) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*Const) Exchange

func (m *Const) Exchange(in *dns.Msg) (*dns.Msg, error)

Exchange is ...

func (*Const) Provision

func (m *Const) Provision(ctx caddy.Context) error

Provision is ...

type Handler

type Handler struct {
	// Upstream is ...
	Upstream
	// Matchers is ...
	Matchers []Matcher
}

Handler is ...

func (*Handler) Cleanup

func (h *Handler) Cleanup() error

Cleanup is ...

func (*Handler) Match

func (h *Handler) Match(msg *dns.Msg) bool

Match is ...

type MatchAll

type MatchAll struct{}

MatchAll is ...

func (MatchAll) CaddyModule

func (MatchAll) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*MatchAll) Match

func (*MatchAll) Match(_ *dns.Msg) bool

Match is ...

type MatchAnd

type MatchAnd struct {
	MatchersRaw []json.RawMessage `json:"match" caddy:"namespace=dnsproxy.matchers inline_key=matcher"`
	// contains filtered or unexported fields
}

MatchAnd is ...

func (MatchAnd) CaddyModule

func (MatchAnd) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*MatchAnd) Match

func (m *MatchAnd) Match(in *dns.Msg) bool

Match is ...

func (*MatchAnd) Provision

func (m *MatchAnd) Provision(ctx caddy.Context) error

Provision is ...

type MatchDomain

type MatchDomain struct {
	// Domains is ...
	Domains []string `json:"domains,omitempty"`
	// contains filtered or unexported fields
}

MatchDomain is ...

func (MatchDomain) CaddyModule

func (MatchDomain) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*MatchDomain) Match

func (m *MatchDomain) Match(in *dns.Msg) bool

Match is ...

func (*MatchDomain) Provision

func (m *MatchDomain) Provision(ctx caddy.Context) error

Provision is ...

type MatchNot

type MatchNot struct {
	MatcherRaw json.RawMessage `json:"match" caddy:"namespace=dnsproxy.matchers inline_key=matcher"`
	// contains filtered or unexported fields
}

MatchNot is ...

func (MatchNot) CaddyModule

func (MatchNot) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*MatchNot) Match

func (*MatchNot) Match(_ *dns.Msg) bool

Match is ...

func (*MatchNot) Provision

func (m *MatchNot) Provision(ctx caddy.Context) error

Provision is ...

type MatchOr

type MatchOr struct {
	MatchersRaw []json.RawMessage `json:"match" caddy:"namespace=dnsproxy.matchers inline_key=matcher"`
	// contains filtered or unexported fields
}

MatchOr is ...

func (MatchOr) CaddyModule

func (MatchOr) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*MatchOr) Match

func (m *MatchOr) Match(in *dns.Msg) bool

Match is ...

func (*MatchOr) Provision

func (m *MatchOr) Provision(ctx caddy.Context) error

Provision is ...

type MatchType

type MatchType struct {
	Types []string `json:"query_type"`
	// contains filtered or unexported fields
}

MatchType is ...

func (MatchType) CaddyModule

func (MatchType) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*MatchType) Match

func (m *MatchType) Match(in *dns.Msg) bool

Match is ...

func (*MatchType) Provision

func (m *MatchType) Provision(ctx caddy.Context) error

Provision is ...

type Matcher

type Matcher interface {
	// Match is ...
	Match(*dns.Msg) bool
}

Matcher is ...

type Packet

type Packet struct {
	// Conn is ...
	Conn net.PacketConn
	// contains filtered or unexported fields
}

Packet is ...

func (*Packet) Close

func (s *Packet) Close() error

Close is ...

func (*Packet) Run

func (s *Packet) Run()

Run is ..

type Quic

type Quic struct {
	// Listener is ...
	Listener *quic.Listener
	// contains filtered or unexported fields
}

Quic is ...

func (*Quic) Close

func (s *Quic) Close() error

CLose is ...

func (*Quic) Run

func (s *Quic) Run()

Run is ...

type Server

type Server interface {
	// Run is ...
	Run()
	// Close is ...
	io.Closer
}

Server is ...

func NewServer

func NewServer(app *App, ctx caddy.Context, t string) (Server, error)

NewServer is ...

type Stream

type Stream struct {
	// Listener is ...
	net.Listener
	// contains filtered or unexported fields
}

Stream is ...

func (*Stream) Close

func (s *Stream) Close() error

Close is ...

func (*Stream) Run

func (s *Stream) Run()

Run is ..

type Terminate

type Terminate struct{}

Terminate is ...

func (Terminate) CaddyModule

func (Terminate) CaddyModule() caddy.ModuleInfo

CaddyModule is ...

func (*Terminate) Exchange

func (m *Terminate) Exchange(in *dns.Msg) (*dns.Msg, error)

Exchange is ...

type Upstream

type Upstream interface {
	// Exchange is ...
	Exchange(m *dns.Msg) (*dns.Msg, error)
}

Upstream is ...

Jump to

Keyboard shortcuts

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