[PR #529] [CLOSED] Implement TS2021 (Tailscale control protocol v2) #1462

Closed
opened 2025-12-29 02:30:09 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/529
Author: @juanfont
Created: 3/29/2022
Status: Closed

Base: mainHead: ts2021-implementation


📝 Commits (10+)

  • be59e8c Generate and read the Noise private key
  • e271851 TS2021: Expose the Noise public key over the /key method
  • ce21718 TS2021: Update deps to get the latest Tailscale objects
  • 55ba302 TS2021: Add Noise upgrade handler
  • 323a7d9 Do not expose the general API router over the Noise connection
  • 834f39d TS2021: Expose Register handler in Noise
  • 928544a Poll kinda working
  • d77cb3b Integration tests WIP
  • 38418e9 Cleanup on the Noise protocol file
  • fc18133 Minor linting stuff

📊 Changes

14 files changed (+952 additions, -123 deletions)

View changed files

📝 api.go (+124 -49)
📝 app.go (+50 -13)
📝 cmd/headscale/cli/utils.go (+4 -3)
📝 config-example.yaml (+7 -0)
📝 go.mod (+1 -1)
📝 grpcv1.go (+4 -2)
📝 integration_test/etc/config.yaml (+1 -0)
📝 integration_test/etc_embedded_derp/config.yaml (+1 -0)
📝 machine.go (+27 -9)
📝 machine_test.go (+30 -0)
noise.go (+126 -0)
noise_api.go (+551 -0)
📝 oidc.go (+18 -18)
📝 poll.go (+8 -28)

📄 Description

This PR adds full support for TS2021, the new control protocol of Tailscale. For reference, see https://github.com/juanfont/headscale/issues/526.

This is a draft PR, for the time being as the integration tests are not working yet.

From what I see the code should work with the current Tailscale unstable release channel (1.23.x) and their HEAD.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/529 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 3/29/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ts2021-implementation` --- ### 📝 Commits (10+) - [`be59e8c`](https://github.com/juanfont/headscale/commit/be59e8cc3c44e4f4e8711ea10595b54939f5035f) Generate and read the Noise private key - [`e271851`](https://github.com/juanfont/headscale/commit/e271851f5c0e1af3970843e75b0e3cf317a5cba9) TS2021: Expose the Noise public key over the `/key` method - [`ce21718`](https://github.com/juanfont/headscale/commit/ce21718454f765cc03e21c5053f7e018744da855) TS2021: Update deps to get the latest Tailscale objects - [`55ba302`](https://github.com/juanfont/headscale/commit/55ba3021f1326b40a12f43edc7a6f5b05455267b) TS2021: Add Noise upgrade handler - [`323a7d9`](https://github.com/juanfont/headscale/commit/323a7d9c2edd5b5205705f41f118f95759ac4e8b) Do not expose the general API router over the Noise connection - [`834f39d`](https://github.com/juanfont/headscale/commit/834f39db31c9172b8b7b685b4ef55d8e80a7fb33) TS2021: Expose Register handler in Noise - [`928544a`](https://github.com/juanfont/headscale/commit/928544a24f1a91c39615802e827d9416daa80c9d) Poll kinda working - [`d77cb3b`](https://github.com/juanfont/headscale/commit/d77cb3ba2149c9183438e56d0784af51c05a1518) Integration tests WIP - [`38418e9`](https://github.com/juanfont/headscale/commit/38418e940f870112f03e5719eeb9a6da06ef80de) Cleanup on the Noise protocol file - [`fc18133`](https://github.com/juanfont/headscale/commit/fc181333e52c4aef1df43512b94cd326978ecec5) Minor linting stuff ### 📊 Changes **14 files changed** (+952 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `api.go` (+124 -49) 📝 `app.go` (+50 -13) 📝 `cmd/headscale/cli/utils.go` (+4 -3) 📝 `config-example.yaml` (+7 -0) 📝 `go.mod` (+1 -1) 📝 `grpcv1.go` (+4 -2) 📝 `integration_test/etc/config.yaml` (+1 -0) 📝 `integration_test/etc_embedded_derp/config.yaml` (+1 -0) 📝 `machine.go` (+27 -9) 📝 `machine_test.go` (+30 -0) ➕ `noise.go` (+126 -0) ➕ `noise_api.go` (+551 -0) 📝 `oidc.go` (+18 -18) 📝 `poll.go` (+8 -28) </details> ### 📄 Description This PR adds full support for TS2021, the new control protocol of Tailscale. For reference, see https://github.com/juanfont/headscale/issues/526. This is a draft PR, for the time being as the integration tests are not working yet. From what I see the code should work with the current Tailscale unstable release channel (1.23.x) and their HEAD. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:30:09 +01:00
adam closed this issue 2025-12-29 02:30:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1462