+ config: "statistics_interval" setting
This commit is contained in:
parent
cc2654c371
commit
fe23b33d7e
|
@ -107,6 +107,9 @@ type dnsConfig struct {
|
|||
BindHost string `yaml:"bind_host"`
|
||||
Port int `yaml:"port"`
|
||||
|
||||
// time interval for statistics (in days)
|
||||
StatsInterval uint `yaml:"statistics_interval"`
|
||||
|
||||
dnsforward.FilteringConfig `yaml:",inline"`
|
||||
|
||||
UpstreamDNS []string `yaml:"upstream_dns"`
|
||||
|
@ -161,8 +164,9 @@ var config = configuration{
|
|||
BindPort: 3000,
|
||||
BindHost: "0.0.0.0",
|
||||
DNS: dnsConfig{
|
||||
BindHost: "0.0.0.0",
|
||||
Port: 53,
|
||||
BindHost: "0.0.0.0",
|
||||
Port: 53,
|
||||
StatsInterval: 1,
|
||||
FilteringConfig: dnsforward.FilteringConfig{
|
||||
ProtectionEnabled: true, // whether or not use any of dnsfilter features
|
||||
FilteringEnabled: true, // whether or not use filter lists
|
||||
|
@ -264,6 +268,10 @@ func parseConfig() error {
|
|||
return err
|
||||
}
|
||||
|
||||
if !checkStatsInterval(config.DNS.StatsInterval) {
|
||||
config.DNS.StatsInterval = 1
|
||||
}
|
||||
|
||||
for _, cy := range config.Clients {
|
||||
cli := Client{
|
||||
Name: cy.Name,
|
||||
|
|
Loading…
Reference in New Issue