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!
This commit is contained in:
Kyle Carberry
2023-03-10 09:58:31 -06:00
committed by GitHub
parent 8b125d6c5d
commit 4a07fcd9d2
+1 -1
View File
@@ -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",