From 455fa6ebc671ef9c57cb6f2515c61e4cc0148adb Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Fri, 10 Mar 2023 15:43:52 +0000 Subject: [PATCH] fix: ensure local derp uses the hostname This broke deployments that use a custom port with an access URL. We should write a test for this! --- cli/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/server.go b/cli/server.go index e97cdb2720cf5..d13e1dda9159f 100644 --- a/cli/server.go +++ b/cli/server.go @@ -621,7 +621,7 @@ flags, and YAML configuration. The precedence is as follows: Nodes: []*tailcfg.DERPNode{{ Name: fmt.Sprintf("%db", cfg.DERP.Server.RegionID), RegionID: int(cfg.DERP.Server.RegionID.Value()), - HostName: cfg.AccessURL.Host, + HostName: cfg.AccessURL.Value().Hostname(), DERPPort: accessURLPort, STUNPort: -1, ForceHTTP: cfg.AccessURL.Scheme == "http",