Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadStrict ¶
Types ¶
type FullConfig ¶
type FullConfig struct {
DNSServer ServerConfig `yaml:"dnsServer"`
GRPC GRPCConfig `yaml:"grpc"`
DoH UpstreamConfig `yaml:"doh"`
UnblockRulesPath string `yaml:"unblock-rules-path"`
Network NetworkConfig `yaml:"network"`
}
func LoadFullConfig ¶
func LoadFullConfig(path string) (*FullConfig, error)
type GRPCAuthConfig ¶
type GRPCAuthConfig struct {
Password string `yaml:"password"`
}
type GRPCConfig ¶
type GRPCConfig struct {
TCP GRPCTCPConfig `yaml:"tcp"`
Unix GRPCUnixConfig `yaml:"unix"`
Auth GRPCAuthConfig `yaml:"auth"`
}
type GRPCTCPConfig ¶
type GRPCTCPConfig struct {
Enabled bool `yaml:"enabled"`
Address string `yaml:"address"`
Auth bool `yaml:"auth"`
TLS GRPCTLSConfig `yaml:"tls"`
}
type GRPCTLSConfig ¶
type GRPCUnixConfig ¶
type NetworkConfig ¶
type NetworkConfig struct {
LANInterface string `yaml:"lan-interface"`
LANInterfaces []string `yaml:"lan-interfaces"`
EnableIPv6 bool `yaml:"enable-ipv6"`
EnableTProxy bool `yaml:"enable-tproxy"`
IPSetDebug bool `yaml:"ipset-debug"`
IPSetStaleQueries int `yaml:"ipset-stale-queries"`
IPSetEntryTimeout int `yaml:"ipset-entry-timeout"`
ReconcileInterval int `yaml:"reconcile-interval"`
LocalExceptions []string `yaml:"local-exceptions"`
}
type ServerConfig ¶
type ServerConfig struct {
Port int `yaml:"port"`
Listen string `yaml:"listen"`
MaxConcurrentConn int `yaml:"max-concurrent-connections"`
Verbose bool `yaml:"verbose"`
CustomResolve map[string][]string `yaml:"custom-resolve"`
CustomResolveTimeout int `yaml:"custom-resolve-timeout"`
Cache *bool `yaml:"cache"`
CacheMaxEntries int `yaml:"cache-max-entries"`
RateLimit int `yaml:"rate-limit"`
Running bool `yaml:"running"`
}
type UpstreamConfig ¶
type UpstreamConfig struct {
Servers []string `yaml:"servers"`
Resolvers []string `yaml:"resolvers"`
CacheTTL int `yaml:"cache-ttl"`
Verbose bool `yaml:"verbose"`
InsecureSkipVerify bool `yaml:"insecure-skip-verify"`
HTTPTimeout int `yaml:"http-timeout"`
DialTimeout int `yaml:"dial-timeout"`
TLSHandshakeTimeout int `yaml:"tls-handshake-timeout"`
ResponseHeaderTimeout int `yaml:"response-header-timeout"`
BootstrapTimeout int `yaml:"bootstrap-timeout"`
MaxCacheEntries int `yaml:"max-cache-entries"`
StaleTTL int `yaml:"stale-ttl"`
CleanupInterval int `yaml:"cleanup-interval"`
MaxConcurrentRequests int `yaml:"max-concurrent-requests"`
PreferIPv6 bool `yaml:"prefer-ipv6"`
}
Click to show internal directories.
Click to hide internal directories.