+ dnsforward: refactor

+ dnsforward: own HTTP handlers
* dnsforward: no DNS reload on ProtectionEnabled setting change
* dnsforward: move QueryLog* settings out
* dnsforward: move dnsfilter settings out
* clients,i18n: no DNS reload on settings change
This commit is contained in:
Simon Zolin
2019-10-30 11:52:58 +03:00
parent 73d17ffa81
commit 7bb32eae3d
10 changed files with 399 additions and 325 deletions

View File

@@ -168,8 +168,7 @@ func (clients *clientsContainer) handleAddClient(w http.ResponseWriter, r *http.
return
}
_ = writeAllConfigsAndReloadDNS()
returnOK(w)
onConfigModified()
}
// Remove client
@@ -192,8 +191,7 @@ func (clients *clientsContainer) handleDelClient(w http.ResponseWriter, r *http.
return
}
_ = writeAllConfigsAndReloadDNS()
returnOK(w)
onConfigModified()
}
type updateJSON struct {
@@ -232,8 +230,7 @@ func (clients *clientsContainer) handleUpdateClient(w http.ResponseWriter, r *ht
return
}
_ = writeAllConfigsAndReloadDNS()
returnOK(w)
onConfigModified()
}
// Get the list of clients by IP address list