Documentation ¶
Index ¶
- Constants
- func GetDomainNameFronDnsMsg(msg *dns.Msg) string
- type Config
- type DohServerConfig
- type Upstream
- func (up *Upstream) Exchange(req *dns.Msg) (*dns.Msg, time.Duration, error)
- func (up *Upstream) Init(config *Config, ipRanger cidranger.Ranger)
- func (up *Upstream) InitConnectionPool(bootstrap func(host string) (net.IP, error))
- func (up *Upstream) IsMatch(domain string) bool
- func (up *Upstream) IsValidMsg(debug bool, r *dns.Msg) bool
- func (up *Upstream) Validate() error
Constants ¶
View Source
const ( StrategyFullest StrategyFastest StrategyAnyResult )
Variables ¶
This section is empty.
Functions ¶
func GetDomainNameFronDnsMsg ¶ added in v1.3.0
Types ¶
type Config ¶
type Config struct { ServeAddr string `json:"serve_addr,omitempty"` DohServer *DohServerConfig `json:"doh_server,omitempty"` Strategy int `json:"strategy,omitempty"` Timeout int `json:"timeout,omitempty"` SocksProxy string `json:"socks_proxy,omitempty"` BuiltInCache bool `json:"built_in_cache,omitempty"` Upstreams []*Upstream `json:"upstreams,omitempty"` Bootstrap []*Upstream `json:"bootstrap,omitempty"` Blacklist []string `json:"blacklist,omitempty"` Debug bool `json:"debug,omitempty"` Profiling bool `json:"profiling,omitempty"` BlacklistSplited [][]string `json:"-"` }
func (*Config) GetDialerContext ¶ added in v1.1.0
func (*Config) ReadInConfig ¶
func (*Config) StrategyName ¶
type DohServerConfig ¶ added in v1.2.6
type Upstream ¶
type Upstream struct { IsPrimary bool `json:"is_primary,omitempty"` UseSocks bool `json:"use_socks,omitempty"` Address string `json:"address,omitempty"` Match []string `json:"match,omitempty"` // contains filtered or unexported fields }
func (*Upstream) InitConnectionPool ¶
Click to show internal directories.
Click to hide internal directories.