-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
There was a problem hiding this 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.
@@ -59,6 +59,8 @@ const ( | |||
privateHexPrefix = "privkey:" | |||
|
|||
PermissionFallback = 0o700 | |||
|
|||
ZstdCompression = "zstd" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Co-authored-by: Kristoffer Dalby <[email protected]>
Co-authored-by: Kristoffer Dalby <[email protected]>
// 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. |
There was a problem hiding this comment.
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
- 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)
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.