juanfont / headscale

An open source, self-hosted implementation of the Tailscale control server
BSD 3-Clause "New" or "Revised" License
23.58k stars 1.3k forks source link

[Feature] Add host_info to api for nodes #2208

Open akelge opened 1 month ago

akelge commented 1 month ago

Use case

I am still developing a web UI for headscale and I would really love to add the OS, OS version and tailscale version to the node information. This can be useful to debug issues and for statistical purposes.

Description

The nodes in the DB have a field called host_info that contains several interesting information, like OS, OS version, tailscale version, arch and even RTT to DERP nodes. These info, though, are not returned by the REST API. It would be useful to return them.

Contribution

How can it be implemented?

Add host_info to the field returned when calling /node or /node/<node_id>

ArcticLampyrid commented 3 days ago

maybe #1205 #1938

kradalby commented 1 day ago

Yes, as @ArcticLampyrid points out, there has been a couple of attempts, it has been blocked by the "strictness" of gRPC which has not allowed us to do this in an ergonomic way without requiring sending the JSON as a escaped string making a terrible API.

I think there are some details in the linked PR/Issues. Happy for someone to work on it, but unless we figure out how to make it "nice" we wont merge it.