Documentation
¶
Index ¶
Constants ¶
View Source
const PluginType = "fast_forward"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct { Upstream []*UpstreamConfig `yaml:"upstream"` Deduplicate bool `yaml:"deduplicate"` CA []string `yaml:"ca"` // certificate path, used by "dot", "doh" as ca root. }
type UpstreamConfig ¶ added in v0.21.0
type UpstreamConfig struct { // Protocol: upstream protocol, can be: // "", "udp" -> udp upstream // "tcp" -> tcp upstream // "dot", "tls" -> dns over tls upstream // "doh", "https" -> dns over https (rfc 8844) upstream Protocol string `yaml:"protocol"` // Addr: upstream network "host:port" addr, "port" can be omitted. // Addr can not be empty. Addr string `yaml:"addr"` Trusted bool `yaml:"trusted"` // If an upstream is "trusted", it's err rcode response will be accepted. Socks5 string `yaml:"socks5"` // used by "tcp", "dot", "doh" as Socks5 server addr. ServerName string `yaml:"server_name"` // used by "dot" as server certificate name. It can not be empty. URL string `yaml:"url"` // used by "doh" as server endpoint url. It can not be empty. // Timeout: used by all protocols. // In "udp", "tcp", "dot", it's read timeout. // In "doh", it's a time limit for the query, including dial connection. // Default is generalReadTimeout. Timeout uint `yaml:"timeout"` // IdleTimeout used by all protocols to control connection idle timeout. // Default: "tcp" & "dot": 0 (disable connection reuse), "doh": 30. IdleTimeout uint `yaml:"idle_timeout"` MaxConns uint `yaml:"max_conns"` // used by "doh", max connections. Default: 1. InsecureSkipVerify bool `yaml:"insecure_skip_verify"` // used by "dot", "doh". Skip tls verification. }
UpstreamConfig: Note: It is not reusable.
Click to show internal directories.
Click to hide internal directories.