fix: fix tailnet netcheck issues (#8802)

This commit is contained in:
Dean Sheather
2023-08-01 08:50:43 -07:00
committed by GitHub
parent 929f2d585a
commit c575292ba6
13 changed files with 260 additions and 62 deletions

View File

@ -172,7 +172,7 @@ func (r *DERPNodeReport) derpURL() *url.URL {
if r.Node.HostName == "" {
derpURL.Host = r.Node.IPv4
}
if r.Node.DERPPort != 0 {
if r.Node.DERPPort != 0 && !(r.Node.DERPPort == 443 && derpURL.Scheme == "https") && !(r.Node.DERPPort == 80 && derpURL.Scheme == "http") {
derpURL.Host = fmt.Sprintf("%s:%d", derpURL.Host, r.Node.DERPPort)
}