+ Login page and web sessions

+ /control/login
+ /control/logout
This commit is contained in:
Simon Zolin
2019-08-29 12:34:07 +03:00
parent 74381b0cad
commit 6304a7b91b
10 changed files with 577 additions and 41 deletions

View File

@@ -51,6 +51,10 @@ func initDNSServer(baseDir string) {
config.queryLog = querylog.New(conf)
config.dnsServer = dnsforward.NewServer(config.stats, config.queryLog)
sessFilename := filepath.Join(config.ourWorkingDir, "data/sessions.db")
config.auth = InitAuth(sessFilename, config.Users)
config.Users = nil
initRDNS()
initFiltering()
}
@@ -202,6 +206,6 @@ func stopDNSServer() error {
config.stats.Close()
config.queryLog.Close()
config.auth.Close()
return nil
}