sdns: Index | Files

package config

import ""


Package Files


type Config Uses

type Config struct {
    Version         string
    BlockLists      []string
    BlockListDir    string
    RootServers     []string
    Root6Servers    []string
    RootKeys        []string
    FallbackServers []string
    AccessList      []string
    LogLevel        string
    AccessLog       string
    Bind            string
    BindTLS         string
    BindDOH         string
    TLSCertificate  string
    TLSPrivateKey   string
    API             string
    Nullroute       string
    Nullroutev6     string
    Hostsfile       string
    OutboundIPs     []string
    OutboundIP6s    []string
    Timeout         Duration
    Expire          uint32
    CacheSize       int
    Maxdepth        int
    RateLimit       int
    ClientRateLimit int
    CookieSecret    string
    NSID            string
    Blocklist       []string
    Whitelist       []string
    Chaos           bool
    QnameMinLevel   int `toml:"qname_min_level"`
    EmptyZones      []string

    Plugins map[string]Plugin
    // contains filtered or unexported fields

Config type

func Load Uses

func Load(cfgfile, version string) (*Config, error)

Load loads the given config file

func (*Config) ServerVersion Uses

func (c *Config) ServerVersion() string

ServerVersion return current server version

type Duration Uses

type Duration struct {

Duration type

func (*Duration) UnmarshalText Uses

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText for duration type

type Plugin Uses

type Plugin struct {
    Path   string
    Config map[string]interface{}

Plugin type

Package config imports 11 packages (graph) and is imported by 17 packages. Updated 2020-07-29. Refresh now. Tools for package owners.