mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add support for multiple tunnel destinations in tailnet (#15409)
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."
This commit is contained in:
@@ -268,7 +268,9 @@ func (c *Client) DialAgent(dialCtx context.Context, agentID uuid.UUID, options *
|
||||
_ = conn.Close()
|
||||
}
|
||||
}()
|
||||
controller.CoordCtrl = tailnet.NewSingleDestController(options.Logger, conn, agentID)
|
||||
coordCtrl := tailnet.NewTunnelSrcCoordController(options.Logger, conn)
|
||||
coordCtrl.AddDestination(agentID)
|
||||
controller.CoordCtrl = coordCtrl
|
||||
controller.DERPCtrl = tailnet.NewBasicDERPController(options.Logger, conn)
|
||||
controller.Run(ctx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user