From c86e046a3b8153d6fd52548379b7c59e9fa964cf Mon Sep 17 00:00:00 2001 From: liuxocakn Date: Sun, 31 Aug 2025 17:59:22 +0800 Subject: [PATCH] Convert the derpmap parsing from yaml to json to ensure compatibility with the tags defined at the time of the DERPMap structure --- hscontrol/derp/derp.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hscontrol/derp/derp.go b/hscontrol/derp/derp.go index 479bfe5c..c85bfc94 100644 --- a/hscontrol/derp/derp.go +++ b/hscontrol/derp/derp.go @@ -17,7 +17,6 @@ import ( "github.com/juanfont/headscale/hscontrol/types" "github.com/spf13/viper" - "gopkg.in/yaml.v3" "tailscale.com/tailcfg" ) @@ -32,7 +31,7 @@ func loadDERPMapFromPath(path string) (*tailcfg.DERPMap, error) { if err != nil { return nil, err } - err = yaml.Unmarshal(b, &derpMap) + err = json.Unmarshal(b, &derpMap) return &derpMap, err }