[PR #738] [MERGED] Implement TS2021 protocol in headscale #1610

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/738
Author: @juanfont
Created: 8/14/2022
Status: Merged
Merged: 8/21/2022
Merged by: @juanfont

Base: mainHead: hs2021-v2


📝 Commits (10+)

  • 6e8e2bf Generate and read the Noise private key
  • 3e8f0e9 Added support for Noise clients in /key handler
  • 014e7ab Make private key errors constants
  • b261d19 Added Noise upgrade handler and Noise mux
  • be24bac Add noise mux and Noise path to base router
  • fdd0c50 Added helper method to fetch machines by any nodekey + tests
  • 1880035 Add registration handler over Noise protocol
  • c7cea9e updated paths
  • 7a91c82 Merge branch 'main' into hs2021-v2
  • 39b85b0 Move getMapResponse into reusable function by TS2019 and TS2021

📊 Changes

30 files changed (+1600 additions, -951 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 Dockerfile.tailscale-HEAD (+3 -1)
📝 api.go (+0 -784)
api_common.go (+80 -0)
📝 app.go (+47 -11)
📝 cmd/headscale/cli/root.go (+2 -2)
📝 cmd/headscale/headscale_test.go (+13 -7)
📝 config-example.yaml (+9 -0)
📝 config.go (+8 -0)
📝 docs/running-headscale-container.md (+3 -0)
📝 flake.nix (+1 -1)
📝 go.mod (+3 -1)
📝 go.sum (+42 -0)
📝 integration_general_test.go (+40 -12)
📝 integration_test/etc/alt-config.dump.gold.yaml (+3 -0)
📝 integration_test/etc/alt-config.yaml (+3 -0)
📝 integration_test/etc/config.dump.gold.yaml (+3 -0)
📝 integration_test/etc/config.yaml (+3 -0)
📝 integration_test/etc_embedded_derp/config.yaml (+4 -2)
📝 machine.go (+27 -11)

...and 10 more files

📄 Description

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

T2021 prefers to run over http, to avoid double encryption. Currently, any port is supported for http. However, for https only tcp/443 works. https://github.com/tailscale/tailscale/pull/4323 is open in upstream to change that.


🔄 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/738 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 8/14/2022 **Status:** ✅ Merged **Merged:** 8/21/2022 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `hs2021-v2` --- ### 📝 Commits (10+) - [`6e8e2bf`](https://github.com/juanfont/headscale/commit/6e8e2bf5083a268a278af5e331d2f0b3f262d157) Generate and read the Noise private key - [`3e8f0e9`](https://github.com/juanfont/headscale/commit/3e8f0e99849538568f329303f032b3655f4add99) Added support for Noise clients in /key handler - [`014e7ab`](https://github.com/juanfont/headscale/commit/014e7abc6855973c7caaeac27aad72eab9b3b88a) Make private key errors constants - [`b261d19`](https://github.com/juanfont/headscale/commit/b261d19cfeadba59254ad7ca2caaea03708e9879) Added Noise upgrade handler and Noise mux - [`be24bac`](https://github.com/juanfont/headscale/commit/be24bacb797315e5ca28392960c2b895e4228a69) Add noise mux and Noise path to base router - [`fdd0c50`](https://github.com/juanfont/headscale/commit/fdd0c5040261d2d7aa1bf4f292aa01411fed2619) Added helper method to fetch machines by any nodekey + tests - [`1880035`](https://github.com/juanfont/headscale/commit/1880035f6fe3e2e65f01607526f433f75c9313e9) Add registration handler over Noise protocol - [`c7cea9e`](https://github.com/juanfont/headscale/commit/c7cea9ef16faa67959a7500be2e31e6c3e838a5c) updated paths - [`7a91c82`](https://github.com/juanfont/headscale/commit/7a91c82cda58064c3800f842905a6572f1e5a7c7) Merge branch 'main' into hs2021-v2 - [`39b85b0`](https://github.com/juanfont/headscale/commit/39b85b02bbef9f0ecd74112524e883d3b3dcbd59) Move getMapResponse into reusable function by TS2019 and TS2021 ### 📊 Changes **30 files changed** (+1600 additions, -951 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `Dockerfile.tailscale-HEAD` (+3 -1) 📝 `api.go` (+0 -784) ➕ `api_common.go` (+80 -0) 📝 `app.go` (+47 -11) 📝 `cmd/headscale/cli/root.go` (+2 -2) 📝 `cmd/headscale/headscale_test.go` (+13 -7) 📝 `config-example.yaml` (+9 -0) 📝 `config.go` (+8 -0) 📝 `docs/running-headscale-container.md` (+3 -0) 📝 `flake.nix` (+1 -1) 📝 `go.mod` (+3 -1) 📝 `go.sum` (+42 -0) 📝 `integration_general_test.go` (+40 -12) 📝 `integration_test/etc/alt-config.dump.gold.yaml` (+3 -0) 📝 `integration_test/etc/alt-config.yaml` (+3 -0) 📝 `integration_test/etc/config.dump.gold.yaml` (+3 -0) 📝 `integration_test/etc/config.yaml` (+3 -0) 📝 `integration_test/etc_embedded_derp/config.yaml` (+4 -2) 📝 `machine.go` (+27 -11) _...and 10 more files_ </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. T2021 prefers to run over http, to avoid double encryption. Currently, any port is supported for http. However, for https only tcp/443 works. https://github.com/tailscale/tailscale/pull/4323 is open in upstream to change that. --- <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:56 +01:00
adam closed this issue 2025-12-29 02:30:56 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1610