mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: remove legacy wsconncache (#11816)
Fixes #8218 Removes `wsconncache` and related "is legacy?" functions and API calls that were used by it. The only leftover is that Agents still use the legacy IP, so that back level clients or workspace proxies can dial them correctly. We should eventually remove this: #11819
This commit is contained in:
@ -31,8 +31,8 @@ import (
|
||||
// client only dials a single agent at a time.
|
||||
//
|
||||
// Deprecated: use tailnet.IP() instead. This is kept for backwards
|
||||
// compatibility with wsconncache.
|
||||
// See: https://github.com/coder/coder/issues/8218
|
||||
// compatibility with outdated CLI clients and Workspace Proxies that dial it.
|
||||
// See: https://github.com/coder/coder/issues/11819
|
||||
var WorkspaceAgentIP = netip.MustParseAddr("fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4")
|
||||
|
||||
var ErrSkipClose = xerrors.New("skip tailnet close")
|
||||
@ -149,16 +149,10 @@ type WorkspaceAgentConn struct {
|
||||
// @typescript-ignore WorkspaceAgentConnOptions
|
||||
type WorkspaceAgentConnOptions struct {
|
||||
AgentID uuid.UUID
|
||||
AgentIP netip.Addr
|
||||
CloseFunc func() error
|
||||
}
|
||||
|
||||
func (c *WorkspaceAgentConn) agentAddress() netip.Addr {
|
||||
var emptyIP netip.Addr
|
||||
if cmp := c.opts.AgentIP.Compare(emptyIP); cmp != 0 {
|
||||
return c.opts.AgentIP
|
||||
}
|
||||
|
||||
return tailnet.IPFromUUID(c.opts.AgentID)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user