Thanks to visit codestin.com
Credit goes to github.com

Skip to content

enhance tailnetAPIConnector to support multiple peers #14729

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

Closed
spikecurtis opened this issue Sep 19, 2024 · 0 comments · Fixed by #15409
Closed

enhance tailnetAPIConnector to support multiple peers #14729

spikecurtis opened this issue Sep 19, 2024 · 0 comments · Fixed by #15409
Assignees
Labels
networking Area: networking

Comments

@spikecurtis
Copy link
Contributor

Right now, the tailnetAPIConnector used for client connections only supports a single peer (a workspace Agent), specified at instantiation. For the use case of a native desktop VPN, we need to support multiple peers that can be added and removed as workspaces are started and stopped.

In implementing this, we should consider refactoring to share code between servertailnet and tailnetAPIConnector, both of which need to support multiple Agent peers.

@spikecurtis spikecurtis added feature networking Area: networking labels Sep 19, 2024
@matifali matifali removed the feature label Oct 14, 2024
spikecurtis added a commit that referenced this issue Nov 5, 2024
Refactors the way clients of the Tailnet API (clients of the API, which include both workspace "agents" and "clients") interact with the API.  Introduces the idea of abstract "controllers" for each of the RPCs in the API, and implements a Coordination controller by refactoring from `workspacesdk`.

chore re: #14729
spikecurtis added a commit that referenced this issue Nov 6, 2024
Implements a Tailnet API DERP controller by refactoring from `workspacesdk`

chore re: #14729
spikecurtis added a commit that referenced this issue Nov 6, 2024
Implements a tailnet API Telemetry controller by refactoring from `workspacesdk`.

chore re: #14729
spikecurtis added a commit that referenced this issue Nov 7, 2024
Implements a controller for the Tailnet API resume token RPC, by refactoring from `workspacesdk`.

chore re: #14729
spikecurtis added a commit that referenced this issue Nov 7, 2024
refactors `tailnetAPIConnector` to use the `Dialer` interface in `tailnet`, introduced lower in this stack of PRs. This will let us use the same Tailnet API handling code across different things that connect to the Tailnet API (CLI client, coderd, workspace proxies, and soon: Coder VPN).

chore re: #14729
jaaydenh pushed a commit that referenced this issue Nov 8, 2024
Implements a controller for the Tailnet API resume token RPC, by refactoring from `workspacesdk`.

chore re: #14729
jaaydenh pushed a commit that referenced this issue Nov 8, 2024
refactors `tailnetAPIConnector` to use the `Dialer` interface in `tailnet`, introduced lower in this stack of PRs. This will let us use the same Tailnet API handling code across different things that connect to the Tailnet API (CLI client, coderd, workspace proxies, and soon: Coder VPN).

chore re: #14729
spikecurtis added a commit that referenced this issue Nov 8, 2024
Refactors `workspacesdk.tailnetAPIConnector` as a `tailnet.Controller` to reuse all the reconnection and graceful disconnect logic.

chore re: #14729
spikecurtis added a commit that referenced this issue Nov 8, 2024
chore of #14729

Refactors the `ServerTailnet` to use `tailnet.Controller` so that we reuse logic around reconnection and handling control messages, instead of reimplementing.  This unifies our "client" use of the tailscale API across CLI, coderd, and wsproxy.
spikecurtis added a commit that referenced this issue Nov 8, 2024
Closes #14729

Expands the Coordination controller used by the CLI client to allow multiple tunnel destinations (agents).  Our current client uses just one, but this unifies the logic so that when we add Coder VPN, 1 is just a special case of "many."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking Area: networking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants