package config type Conf struct { Addr string `comment:"监听地址 默认 ':53'"` DomainPattern string `comment:"用于 dns log 的域名"` Proxy bool `comment:"代理其他 dns 请求"` ProxyServer string `comment:"代理的dns服务器地址"` } func DefaultConfig() *Conf { return &Conf{ Addr: ":53", DomainPattern: ".", Proxy: false, ProxyServer: "1.1.1.1:53", } }