From 4a07fcd9d239b75a3694a3a31b3b2daf29c63095 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Fri, 10 Mar 2023 09:58:31 -0600 Subject: [PATCH] fix: ensure local derp uses the hostname (#6559) 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 e97cdb2720..d13e1dda91 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",