[FR] Client Version
It would be great to see the client version and host OS details in the UI.
I know this might be a bit tricky as I couldn't see a way in the API to get this info, though it's stored in the DB (nodes.host_info).
Perhaps since it's already reading Headscale's config.yaml file, it could then query the DB to get this info whether it's sqlite or postgres.
+------------+------------+-----------------+-----------------------+
| Machine | Addresses | Version | Last Seen |
+------------+------------+-----------------+-----------------------+
| my-home-pc | 100.64.0.1 | 1.70.0 | Connected |
| | | Windows 11 23H2 | |
+------------+------------+-----------------+-----------------------+
| my-work-pc | 100.64.0.2 | 1.70.0 | Jul 27, 10:14 AM AEST |
| | | Windows 11 23H2 | |
+------------+------------+-----------------+-----------------------+
I don't want to query the database for safety reasons, however there is this PR that isn't merged in Headscale that would make this possible. https://github.com/juanfont/headscale/pull/1938
It looks like that PR got closed. Perhaps another way forward is to have a TS client built in that can then use the local API to get this info. This potentially would also help with #32.
Probably, or I could just fold and read the database file (if it's sqlite).
I think the built in client might be a better option, but it's likely more work.
It looks like you can get more data via the local api than what's stored in the DB which might be more advantageous in the long run. And it means that's Postgres users will be able to get the same experience.
What exactly do you mean by local client, I'm a little confused on that part?
I couldn’t find any official documentation on this, but I came across a mention of it in a blog post. I’ve successfully managed to get it working through the CLI while debugging within my own Tailnet. The command I use for testing it externally to the Tailscale process is: tailscale debug local-creds.
The new Tailscale “localapi” lets local apps query the local tailscale instance over HTTP. For example, it can get a list of peer devices that might be Taildrop targets, or which services are running on those peers. (Source)
Ah, so it needs to run on a device that's been added into the Tailnet? This is definitely something I'd want to do then if it makes it easier for us to add more functionality like this.
Edit: It only appears to give the OS and not the installed version on devices (I don't think).
Rather than having to run tailscale on the machine that headplane is on. You could embed a tailscale client in it, a working example of this would be tailscale/golink.
I'm 99% sure it provides the version, I'll have a look and see what endpoint it was I saw it in when I can later today. I think it's status or whois off the top of my head.
It shows version for itself, but not for other devices, meaning it would need to be installed on all devices?
Never mind, looks like whois?addr=<address> gets this information.
Going to close this in favor of #65, it's still happening though.