HCR SUPPORT

This commit is contained in:
2026-09-13 22:31:36 -03:00
parent ede2e9eb89
commit 2b5a8c4452
13 changed files with 2393 additions and 5 deletions
+4
View File
@@ -96,6 +96,7 @@ func serverConfigPost(w http.ResponseWriter, r *http.Request) {
PAMAuthEnabled *bool `json:"pam_auth_enabled"`
BHTTP *json.RawMessage `json:"bhttp"`
BTUN *json.RawMessage `json:"btun"`
HCR *json.RawMessage `json:"hcr"`
}
if err := json.Unmarshal(body, &fieldPresence); err != nil {
http.Error(w, "invalid JSON: "+err.Error(), http.StatusBadRequest)
@@ -128,6 +129,9 @@ func serverConfigPost(w http.ResponseWriter, r *http.Request) {
if fieldPresence.BTUN == nil {
newCfg.BTUN = globalCfg.BTUN
}
if fieldPresence.HCR == nil {
newCfg.HCR = globalCfg.HCR
}
}
globalCfgMu.RUnlock()