Make log and traffic retention configurable; limit DNS presets to Quad9

- Settings → Data retention: log file size, number of old log files,
  hourly and daily traffic history. Stored as log and stats in
  config.json, validated, and applied without a restart; lowering a
  limit deletes older log files and history after confirmation.
- Traffic history is now pruned by time instead of by bucket count.
- Server page DNS provider list offers only Quad9 and Custom.

Claude-Session: https://claude.ai/code/session_01RAnLbyQZ5ZTA7KqwXP98nw
This commit is contained in:
Daniel Redetzke
2026-10-03 17:48:33 +03:00
parent b394a6d5d9
commit 1543069089
8 changed files with 217 additions and 27 deletions
+2 -2
View File
@@ -200,7 +200,7 @@ func run(configPath string) error {
auth := newAuth(store)
app := &App{
store: store, kernel: kernel, recon: recon, stats: stats, auth: auth, tls: webTLS,
logPath: logPath, started: time.Now(), shutdown: shutdown,
logPath: logPath, logw: logw, started: time.Now(), shutdown: shutdown,
}
var wg sync.WaitGroup
@@ -270,7 +270,7 @@ func run(configPath string) error {
if err := store.Reload(); err != nil {
slog.Error("reload failed", "err", err)
} else {
logLevel.Set(parseLevel(store.Get().Log.Level))
app.applyRuntime(store.Get())
recon.Kick()
slog.Info("config reloaded")
}