Documentation
¶
Index ¶
- Constants
- func NewHTTPListener(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Listener, error)
- func NewListener(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Listener, error)
- func NewQUICListener(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Listener, error)
- func NewTCPListener(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Listener, error)
- func NewTLSListener(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Listener, error)
- func NewUDPListener(ctx context.Context, core adapter.Core, logger log.Logger, tag string, ...) (adapter.Listener, error)
- type GenericListener
- type HTTPListener
- func (l *HTTPListener) Close() error
- func (l *HTTPListener) Handle(ctx context.Context, req *dns.Msg, clientAddr netip.AddrPort) *dns.Msg
- func (l *HTTPListener) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (l *HTTPListener) Start() error
- func (l *HTTPListener) Tag() string
- func (l *HTTPListener) Type() string
- type HTTPListenerOptions
- type Options
- type QUICListener
- type QUICListenerOptions
- type TCPListener
- type TCPListenerOptions
- type TLSListener
- type TLSListenerOptions
- type TLSOptions
- type UDPListener
- type UDPListenerOptions
Constants ¶
View Source
const ( DefaultIdleTimeout = 60 * time.Second DefaultDealTimeout = 20 * time.Second DefaultMaxConnection = 256 )
View Source
const ( HTTPListenerType = "http" HTTPListenerDefaultPath = "/dns-query" )
View Source
const ( UDPListenerType = "udp" UDPMaxBufferSize = 4096 )
View Source
const QUICListenerType = "quic"
View Source
const TCPListenerType = "tcp"
View Source
const TLSListenerType = "tls"
Variables ¶
This section is empty.
Functions ¶
func NewHTTPListener ¶
func NewListener ¶
func NewQUICListener ¶
func NewTCPListener ¶
func NewTLSListener ¶
Types ¶
type GenericListener ¶
func (*GenericListener) Close ¶
func (l *GenericListener) Close() error
func (*GenericListener) Start ¶
func (l *GenericListener) Start() error
type HTTPListener ¶
type HTTPListener struct {
// contains filtered or unexported fields
}
func (*HTTPListener) Close ¶
func (l *HTTPListener) Close() error
func (*HTTPListener) ServeHTTP ¶
func (l *HTTPListener) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*HTTPListener) Start ¶
func (l *HTTPListener) Start() error
func (*HTTPListener) Tag ¶
func (l *HTTPListener) Tag() string
func (*HTTPListener) Type ¶
func (l *HTTPListener) Type() string
type HTTPListenerOptions ¶
type HTTPListenerOptions struct { Listen string `yaml:"listen"` Path string `yaml:"path"` ReadIPHeader string `yaml:"read-ip-header,omitempty"` TrustIP utils.Listable[string] `yaml:"trust-ip,omitempty"` UseHTTP3 bool `yaml:"use-http3,omitempty"` Enable0RTT bool `yaml:"enable-0rtt,omitempty"` TLSOptions *TLSOptions `yaml:",inline,omitempty"` }
type Options ¶
type Options struct { Tag string Type string DealTimeout time.Duration Workflow string UDPOptions *UDPListenerOptions TCPOptions *TCPListenerOptions TLSOptions *TLSListenerOptions HTTPOptions *HTTPListenerOptions QUICOptions *QUICListenerOptions }
func (*Options) UnmarshalYAML ¶
type QUICListener ¶
type QUICListener struct {
// contains filtered or unexported fields
}
func (*QUICListener) Close ¶
func (l *QUICListener) Close() error
func (*QUICListener) Start ¶
func (l *QUICListener) Start() error
func (*QUICListener) Tag ¶
func (l *QUICListener) Tag() string
func (*QUICListener) Type ¶
func (l *QUICListener) Type() string
type QUICListenerOptions ¶
type TCPListener ¶
type TCPListener struct {
// contains filtered or unexported fields
}
func (*TCPListener) Close ¶
func (l *TCPListener) Close() error
func (*TCPListener) Start ¶
func (l *TCPListener) Start() error
func (*TCPListener) Tag ¶
func (l *TCPListener) Tag() string
func (*TCPListener) Type ¶
func (l *TCPListener) Type() string
type TCPListenerOptions ¶
type TLSListener ¶
type TLSListener struct {
// contains filtered or unexported fields
}
func (*TLSListener) Close ¶
func (l *TLSListener) Close() error
func (*TLSListener) Start ¶
func (l *TLSListener) Start() error
func (*TLSListener) Tag ¶
func (l *TLSListener) Tag() string
func (*TLSListener) Type ¶
func (l *TLSListener) Type() string
type TLSListenerOptions ¶
type TLSListenerOptions struct { Listen string `yaml:"listen"` IdleTimeout utils.Duration `yaml:"idle-timeout,omitempty"` MaxConnection int `yaml:"max-connection,omitempty"` TLSOptions TLSOptions `yaml:",inline,omitempty"` }
type TLSOptions ¶
type UDPListener ¶
type UDPListener struct {
// contains filtered or unexported fields
}
func (*UDPListener) Close ¶
func (l *UDPListener) Close() error
func (*UDPListener) Start ¶
func (l *UDPListener) Start() error
func (*UDPListener) Tag ¶
func (l *UDPListener) Tag() string
func (*UDPListener) Type ¶
func (l *UDPListener) Type() string
type UDPListenerOptions ¶
Click to show internal directories.
Click to hide internal directories.