Ver Fonte

Support more variants of specifying an IPv6 address to listen to

Ask Bjørn Hansen há 13 anos atrás
pai
commit
e7f96ebc83
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      geodns.go

+ 4 - 0
geodns.go

@@ -80,6 +80,10 @@ func main() {
 				strings.LastIndex(host, "]") == len(host)-1:
 				ip = host[1 : len(host)-1]
 				port = ""
+			case strings.Contains(err.Error(), "too many colons in address"):
+				// a:b::c
+				ip = host
+				port = ""
 			default:
 				log.Fatalf("Could not parse %s: %s\n", host, err)
 			}