Decorate IPv6 addresses in connection_t->address to avoid ambiguity
Currently, connection_t->address can be in one of three formats:
- hostname: www.example.com
- IPv4: 18.104.22.168
- IPv6: 2003::0001
Tor often uses this address with a port like this:
- hostname: www.example.com:1234
- IPv4: 22.214.171.124:1234
- IPv6: 2003::0001:1234
The IPv6 case is ambiguous, and we should fix it.
One way of fixing it is to provide a flag if address is an IPv6 literal, and a function to format address and port. (Unfortunately, we can't always decorate IPv6 addresses, because that would cause bugs in other code and in controllers.)
Then we would need to go through every instance of
conn->address and find the ones that use a port. This may also require a spec update, like #24603 (moved).