Fix ipv6 address advertisement

This commit is contained in:
Wim 2015-12-22 21:40:36 +01:00
parent 13739c886a
commit fb92a7a802

View file

@ -354,6 +354,11 @@ func (c *ServerCommand) detectAdvertise(detect physical.AdvertiseDetect,
return "", err
}
// set [] for ipv6 addresses
if strings.Contains(host, ":") && !strings.Contains(host, "]") {
host = "[" + host + "]"
}
// Default the port and scheme
scheme := "https"
port := 8200