From 6b684d95a426ab7302c0612bb8af8153589780cd Mon Sep 17 00:00:00 2001 From: Anish Mukherjee Date: Mon, 20 Mar 2023 17:47:41 +0530 Subject: [PATCH] add host auto updated setting with default true --- logic/hosts.go | 1 + models/host.go | 1 + 2 files changed, 2 insertions(+) diff --git a/logic/hosts.go b/logic/hosts.go index 19feda1a..79e32d60 100644 --- a/logic/hosts.go +++ b/logic/hosts.go @@ -97,6 +97,7 @@ func CreateHost(h *models.Host) error { return err } h.HostPass = string(hash) + h.AutoUpdate = true // if another server has already updated proxyenabled, leave it alone if !h.ProxyEnabledSet { log.Println("checking default proxy", servercfg.GetServerConfig().DefaultProxyMode) diff --git a/models/host.go b/models/host.go index 4b2231b6..5689b9cb 100644 --- a/models/host.go +++ b/models/host.go @@ -33,6 +33,7 @@ type Host struct { Version string `json:"version" yaml:"version"` IPForwarding bool `json:"ipforwarding" yaml:"ipforwarding"` DaemonInstalled bool `json:"daemoninstalled" yaml:"daemoninstalled"` + AutoUpdate bool `json:"autoupdate" yaml:"autoupdate"` HostPass string `json:"hostpass" yaml:"hostpass"` Name string `json:"name" yaml:"name"` OS string `json:"os" yaml:"os"`