diff --git a/cmd/derper/derper.go b/cmd/derper/derper.go index 3eccdfbee..66a00d759 100644 --- a/cmd/derper/derper.go +++ b/cmd/derper/derper.go @@ -33,6 +33,7 @@ "tailscale.com/net/stun" "tailscale.com/tsweb" "tailscale.com/types/key" + "tailscale.com/version" ) var ( @@ -221,6 +222,7 @@ func debugHandler(s *derp.Server) http.Handler { f("
  • Hostname: %v
  • \n", *hostname) f("
  • Uptime: %v
  • \n", tsweb.Uptime()) f("
  • Mesh Key: %v
  • \n", s.HasMeshKey()) + f("
  • Version: %v
  • \n", version.LONG) f(`
  • /debug/vars (Go)
  • /debug/varz (Prometheus)
  • diff --git a/derp/derp_server.go b/derp/derp_server.go index a83f7dbbe..acc7c5866 100644 --- a/derp/derp_server.go +++ b/derp/derp_server.go @@ -29,6 +29,7 @@ "tailscale.com/metrics" "tailscale.com/types/key" "tailscale.com/types/logger" + "tailscale.com/version" ) var debug, _ = strconv.ParseBool(os.Getenv("DERP_DEBUG_LOGS")) @@ -1191,6 +1192,9 @@ func (s *Server) ExpVar() expvar.Var { m.Set("multiforwarder_created", &s.multiForwarderCreated) m.Set("multiforwarder_deleted", &s.multiForwarderDeleted) m.Set("packet_forwarder_delete_other_value", &s.removePktForwardOther) + var expvarVersion expvar.String + expvarVersion.Set(version.LONG) + m.Set("version", &expvarVersion) return m }