Documentation
¶
Index ¶
Constants ¶
View Source
const PluginType = "server"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct { Server []*ServerConfig `yaml:"server"` Entry string `yaml:"entry"` MaxConcurrentQueries int `yaml:"max_concurrent_queries"` }
type ServerConfig ¶
type ServerConfig struct { // Protocol: server protocol, can be: // "", "udp" -> udp // "tcp" -> tcp // "dot", "tls" -> dns over tls // "doh", "https" -> dns over https (rfc 8844) // "http" -> dns over https (rfc 8844) but without tls Protocol string `yaml:"protocol"` // Addr: server "host:port" addr, "port" can be omitted. // Addr can not be empty. Addr string `yaml:"addr"` Cert string `yaml:"cert"` // certificate path, used by dot, doh Key string `yaml:"key"` // certificate key path, used by dot, doh URLPath string `yaml:"url_path"` // used by doh, url path. If it's emtpy, any path will be handled. Timeout uint `yaml:"timeout"` // (sec) used by all protocol as query timeout, default is defaultQueryTimeout. IdleTimeout uint `yaml:"idle_timeout"` // (sec) used by tcp, dot, doh as connection idle timeout, default is defaultIdleTimeout. // contains filtered or unexported fields }
ServerConfig is not safe for concurrent use.
type ServerGroup ¶ added in v1.1.1
func NewServerGroup ¶ added in v1.1.1
func NewServerGroup(bp *handler.BP, handler utils.ServerHandler, configs []*ServerConfig) *ServerGroup
func (*ServerGroup) Activate ¶ added in v1.1.1
func (sg *ServerGroup) Activate() error
func (*ServerGroup) Shutdown ¶ added in v1.1.1
func (sg *ServerGroup) Shutdown() error
func (*ServerGroup) WaitErr ¶ added in v1.1.1
func (sg *ServerGroup) WaitErr() error
Click to show internal directories.
Click to hide internal directories.