juanfont / headscale

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

[Feature] Compatibility with Tailout #2103

Open plittlefield opened 3 weeks ago

plittlefield commented 3 weeks ago

Use case

Make Headscale work with the Tailout project.

Description

The project Tailout is very promising but has hit a snag working with a Headscale server instead of the Tailscale server.

Here is the issue I opened.

I hope you can help.

Contribution

How can it be implemented?

No response

kradalby commented 3 weeks ago

hmm, looks like it depends on being compatible with the Tailscale SaaS API, this is likely a huge undertaking, it comes up from time to time.

It looks like it only uses API keys and not oauth, making it less impossible. But it is likely more productive, or at least faster, to have tailout implement our new Policy API endpoint than us trying to copy the other one.

cterence commented 3 weeks ago

Thanks for your quick response @kradalby. Would you therefore recommend for Tailout to support Headscale by reimplementing the specific API calls without using the Tailscale GO client ?

kradalby commented 3 weeks ago

That should allow you to set it up right now at least, we have a gRPC client, so it should be fairly straightforward to add it and use that as an alternative to the Tailscale go client, at least if we support the equivalent to all the endpoints you need.

The available funcs are here https://github.com/juanfont/headscale/blob/main/hscontrol/grpcv1.go, so you can give it a quick skim to see if all you need is there.

plittlefield commented 3 weeks ago

Wow, quick response - thanks everyone! :-)