Problem Summary:
Now the etcd client address do not support host format such as
http://[ipv6]:port.
and [RFC
3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2)
```
A host identified by an Internet Protocol literal address, version 6
[[RFC3513](https://datatracker.ietf.org/doc/html/rfc3513)] or later, is distinguished by enclosing the IP literal
within square brackets ("[" and "]"). This is the only place where
square bracket characters are allowed in the URI syntax. In
anticipation of future, as-yet-undefined IP literal address formats,
an implementation may use an optional version flag to indicate such a
format explicitly rather than rely on heuristic determination.
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
```
the ipv6 address is distinguished by enclosing the IP literal within
square brackets ("[" and "]").
What is changed and how it works:
if we find the host part of a URL starts with a "[" and ends with a "]".
it will be specifically judged whether it is a valid IPv6 address. If it
is a valid address, it can be returned directly without call the
`getaddrinfo` interface.