Merged
Conversation
Member
Author
mholt
reviewed
May 8, 2024
Contributor
mholt
left a comment
There was a problem hiding this comment.
Neat! I didn't read it too thoroughly yet but with a quick scan I don't see anything that caught my attention other than a typo :) (I don't know much/anything about TS-domain stuff so I was just looking at the Caddy stuff)
Member
Author
|
awesome, thanks for giving it a once-over! |
clly
approved these changes
May 8, 2024
Contributor
clly
left a comment
There was a problem hiding this comment.
Looks like a really clean refactor!
transport.go
Outdated
|
|
||
| s, err := getServer(ctx, "caddy-tsnet-client:80") | ||
| // TODO(will): allow users to specify a node name used to lookup that node's config in TSApp. | ||
| s, err := getNode(ctx, "caddy-tsnet-client:80") |
Contributor
There was a problem hiding this comment.
Should this be just caddy-tsnet-client?
Member
Author
There was a problem hiding this comment.
oh, good catch! I remember seeing that, and forgot to fix it
This includes: - Move TailscaleAuth logic into auth.go - Move all TSApp logic into app.go (including caddyfile parsing) - Rename "server" to "node" throughout. This aligns better with Tailscale terminology, and is reflective of the fact that nodes can also just be used as proxy transports, in which case they are not acting as servers at all. - Generally prefer referring to a node's "name" than "host". While this name is still used as the default hostname for the node, I would expect that to change with a future iteration of #18. - add godocs throughout Signed-off-by: Will Norris <will@tailscale.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is admittedly a pretty sizeable refactor, but is almost exclusively renames, code movement, and documentation. There should be no logic changes. There is technically one breaking change in renaming
TSApp.ServerstoTSApp.Nodes, but only for folks using the JSON config directly (caddyfile doesn't use the name).The refactoring in this change includes: