From fb92a7a802aefa4de1016631a8ce7221c2dc0687 Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 22 Dec 2015 21:40:36 +0100 Subject: [PATCH] Fix ipv6 address advertisement --- command/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/server.go b/command/server.go index fea95fa870..a6ecffa776 100644 --- a/command/server.go +++ b/command/server.go @@ -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