mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-05-06 05:38:50 +00:00
feat: update to go1.24 & support listening https (#1002)
* feat: support listening https * refactor * modernize * support snake case in config * more precise control of config fields * update goreleaser config * remove kubeyaml * fix: expose agent_secret * chore
This commit is contained in:
+3
-3
@@ -5,9 +5,9 @@ import (
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/nezhahq/nezha/pkg/utils"
|
||||
pb "github.com/nezhahq/nezha/proto"
|
||||
)
|
||||
|
||||
@@ -59,13 +59,13 @@ func (s *Server) CopyFromRunningServer(old *Server) {
|
||||
|
||||
func (s *Server) AfterFind(tx *gorm.DB) error {
|
||||
if s.DDNSProfilesRaw != "" {
|
||||
if err := utils.Json.Unmarshal([]byte(s.DDNSProfilesRaw), &s.DDNSProfiles); err != nil {
|
||||
if err := json.Unmarshal([]byte(s.DDNSProfilesRaw), &s.DDNSProfiles); err != nil {
|
||||
log.Println("NEZHA>> Server.AfterFind:", err)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if s.OverrideDDNSDomainsRaw != "" {
|
||||
if err := utils.Json.Unmarshal([]byte(s.OverrideDDNSDomainsRaw), &s.OverrideDDNSDomains); err != nil {
|
||||
if err := json.Unmarshal([]byte(s.OverrideDDNSDomainsRaw), &s.OverrideDDNSDomains); err != nil {
|
||||
log.Println("NEZHA>> Server.AfterFind:", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user