From 2b7bcb77a59e08703271b26297dba6f37f9b5ced Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 2 Feb 2023 10:34:50 +0100 Subject: [PATCH] Stop using deprecated string function Signed-off-by: Kristoffer Dalby --- derp_server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/derp_server.go b/derp_server.go index fa2b27f6..c4e0d65f 100644 --- a/derp_server.go +++ b/derp_server.go @@ -157,14 +157,14 @@ func (h *Headscale) DERPHandler( if !fastStart { pubKey := h.privateKey.Public() - pubKeyStr := pubKey.UntypedHexString() //nolint + pubKeyStr, _ := pubKey.MarshalText() //nolint fmt.Fprintf(conn, "HTTP/1.1 101 Switching Protocols\r\n"+ "Upgrade: DERP\r\n"+ "Connection: Upgrade\r\n"+ "Derp-Version: %v\r\n"+ "Derp-Public-Key: %s\r\n\r\n", derp.ProtocolVersion, - pubKeyStr) + string(pubKeyStr)) } h.DERPServer.tailscaleDERP.Accept(req.Context(), netConn, conn, netConn.RemoteAddr().String())