From b0b919efb02870b6644124a711666c05e466b457 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Mon, 20 Jun 2022 12:32:13 +0200 Subject: [PATCH] Added more logging to derp server --- derp_server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/derp_server.go b/derp_server.go index 2cbfb746..9f990337 100644 --- a/derp_server.go +++ b/derp_server.go @@ -30,6 +30,7 @@ type DERPServer struct { } func (h *Headscale) NewDERPServer() (*DERPServer, error) { + log.Trace().Caller().Msg("Creating new embedded DERP server") server := derp.NewServer(key.NodePrivate(*h.privateKey), log.Info().Msgf) region, err := h.generateRegionLocalDERP() if err != nil { @@ -87,6 +88,7 @@ func (h *Headscale) generateRegionLocalDERP() (tailcfg.DERPRegion, error) { } localDERPregion.Nodes[0].STUNPort = portSTUN + log.Info().Caller().Msgf("DERP region: %+v", localDERPregion) return localDERPregion, nil } @@ -128,6 +130,7 @@ func (h *Headscale) DERPHandler( return } + log.Trace().Caller().Msgf("Hijacked connection from %v", r.RemoteAddr) if !fastStart { pubKey := h.privateKey.Public()