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

Implement TS2021 protocol in headscale #738

Merged
merged 77 commits into from
Aug 21, 2022
Merged

Implement TS2021 protocol in headscale #738

merged 77 commits into from
Aug 21, 2022

Conversation

juanfont
Copy link
Owner

This PR adds full support for TS2021, the new control protocol of Tailscale. For reference, see #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. tailscale/tailscale#4323 is open in upstream to change that.

@juanfont juanfont marked this pull request as ready for review August 18, 2022 18:01
@juanfont juanfont requested a review from kradalby as a code owner August 18, 2022 18:01
Copy link
Collaborator

@kradalby kradalby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the first round, need to look more careful another few times.

Some comments might have already been outdated as I went through the code, but there are so many that I lost my overview.

app.go Show resolved Hide resolved
config-example.yaml Outdated Show resolved Hide resolved
api.go Outdated Show resolved Hide resolved
noise.go Outdated Show resolved Hide resolved
noise.go Outdated Show resolved Hide resolved
cmd/headscale/headscale_test.go Outdated Show resolved Hide resolved
@@ -59,6 +59,8 @@ const (
privateHexPrefix = "privkey:"

PermissionFallback = 0o700

ZstdCompression = "zstd"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be more appropriate as "Compression"? as in, it is the compression used.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this can change, as the compression the node requests comes in MapRequest

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly, if it changes, we dont have to rename the variable and the value, only the value?

noise_poll.go Outdated Show resolved Hide resolved
machine.go Outdated Show resolved Hide resolved
noise.go Outdated Show resolved Hide resolved
// It is used both by the legacy and the new Noise protocol.
// When using Noise, the machineKey is Zero.
//
// TODO: check if any locks are needed around IP allocation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this TODO is outdated

@juanfont juanfont merged commit 84a5edf into main Aug 21, 2022
@juanfont juanfont deleted the hs2021-v2 branch August 21, 2022 14:02
Misterio77 added a commit to Misterio77/nixpkgs that referenced this pull request Nov 30, 2022
- logLevel was removed in favor of settings.log.level (juanfont/headscale#768)
- a noisePrivateKey option was added as it is now a required setting for
  headscale to run. The legacy privateKey should be deprecated in the
  future. (juanfont/headscale#738)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants