conf

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadStrict

func LoadStrict(path string) error

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 GRPCTLSConfig struct {
	Cert     string `yaml:"cert"`
	Key      string `yaml:"key"`
	ClientCA string `yaml:"client-ca"`
}

type GRPCUnixConfig

type GRPCUnixConfig struct {
	Enabled bool   `yaml:"enabled"`
	Path    string `yaml:"path"`
}

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"`
}

Jump to

Keyboard shortcuts

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