支持DNSSEC

This commit is contained in:
Alex Yang
2025-12-15 23:54:11 +08:00
parent 9aa328d466
commit ba26e2b647
12 changed files with 1169 additions and 141 deletions

View File

@@ -12,6 +12,7 @@ type DNSConfig struct {
Timeout int `json:"timeout"`
StatsFile string `json:"statsFile"` // 统计数据持久化文件
SaveInterval int `json:"saveInterval"` // 数据保存间隔(秒)
EnableDNSSEC bool `json:"enableDNSSEC"` // 是否启用DNSSEC验证
}
// HTTPConfig HTTP控制台配置
@@ -86,6 +87,8 @@ func LoadConfig(path string) (*Config, error) {
if config.DNS.SaveInterval == 0 {
config.DNS.SaveInterval = 300 // 默认5分钟保存一次
}
// 默认启用DNSSEC
config.DNS.EnableDNSSEC = true
if config.HTTP.Port == 0 {
config.HTTP.Port = 8080
}