config

package
v0.0.0-...-45c970c Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SelectorClock use clock selector
	SelectorClock = Selectors("clock")
	// SelectorRandom use random selector
	SelectorRandom = Selectors("random")
	// SelectorSWRR use Smooth-weighted-round-robin selector
	SelectorSWRR = Selectors("swrr")
	// SelectorWRandom use Weighted-random selector
	SelectorWRandom = Selectors("wrandom")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigFile  string                         `toml:"-"`
	Config      typeGeneralConfig              `toml:"config"`
	HTTPS       []typeUpstreamHTTPS            `toml:"https"`
	TLS         []typeUpstreamTLS              `toml:"tls"`
	Traditional []typeTraditional              `toml:"traditional"`
	Hosts       map[string]map[string][]string `toml:"hosts"`
}

Config described user configuration

func LoadConfig

func LoadConfig(configPath string) (config *Config, err error)

LoadConfig from configuration file

type DNSSettings

type DNSSettings struct {
	CustomECS        []net.IP `toml:"custom_ecs"`
	FallbackNoECS    bool     `toml:"fallback_no_ecs"`
	NoECS            bool     `toml:"no_ecs"`
	UserAgent        string   `toml:"user_agent"`
	NoUserAgent      bool     `toml:"no_user_agent"`
	NoSingleInflight bool     `toml:"no_single_inflight"`
}

DNSSettings described general settings of DNS resolver

type Selectors

type Selectors string

Selectors type

Jump to

Keyboard shortcuts

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