Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more machine info via api #1205

Closed
TymanWasTaken opened this issue Feb 6, 2023 · 3 comments
Closed

Expose more machine info via api #1205

TymanWasTaken opened this issue Feb 6, 2023 · 3 comments
Labels
enhancement New feature or request stale

Comments

@TymanWasTaken
Copy link

Feature request

Currently, the headscale http api allows for programs to list and get info on machines connected to the headscale network, such as IP, name, last seen date, and routes. However, it is still missing a lot of information that would be nice to have exposed, such as tailscale SSH support, tailscale client version, or network info (such as DERP latency and connection info such as hairpinning or UPnP/PCP/PMP support).

This information would be beneficial to be exposed in order to both allow for better display of devices from for example a web browser or another API client. My specific use case was that I recently setup home assistant, and noticed that the builtin tailscale integration did not support headscale. I would like to make a headscale integration, however many of the features of the builtin tailscale integration are not possible due to the lack of exposed information in the headscale API.

Additionally, this information would likely be easily exposed, as a quick inspection of the headscale database shows that this information is already stored in the host_info column of the machines table. For example, ssh support can be detected from the sshHostKeys field, and all of the network info such as UPnP and DERP info is seen in the NetInfo field.

@TymanWasTaken TymanWasTaken added the enhancement New feature or request label Feb 6, 2023
@juanfont
Copy link
Owner

Hi @TymanWasTaken, @joshuataylor

There has been a PR on this by @joshuataylor #942.

After discussing it with @kradalby, we reckon it would be safer/saner for Headscale if you just marshal the Machine.HostInfo as a string into gRPC, rather than transforming it into a proto object in Headscale. This way, if something changes (and it might from Tailscale side) Headscale would not be affected.

Copy link
Contributor

github-actions bot commented Nov 7, 2023

This issue is stale because it has been open for 180 days with no activity.

@github-actions github-actions bot added the stale label Nov 7, 2023
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants