mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add Coder service prefix to tailnet (#14943)
re: #14715 This PR introduces the Coder service prefix: `fd60:627a:a42b::/48` and refactors our existing code as calling the Tailscale service prefix explicitly (rather than implicitly). Removes the unused `Addresses` agent option. All clients today assume they can compute the Agent's IP address based on its UUID, so an agent started with a custom address would break things.
This commit is contained in:
@@ -186,7 +186,9 @@ func TestServerTailnet_ReverseProxy(t *testing.T) {
|
||||
// Ensure the reverse proxy director rewrites the url host to the agent's IP.
|
||||
rp.Director(req)
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("[%s]:%d", tailnet.IPFromUUID(a.id).String(), workspacesdk.AgentHTTPAPIServerPort),
|
||||
fmt.Sprintf("[%s]:%d",
|
||||
tailnet.TailscaleServicePrefix.AddrFromUUID(a.id).String(),
|
||||
workspacesdk.AgentHTTPAPIServerPort),
|
||||
req.URL.Host,
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user