Description
I need to have more control over whether the IPv4/IPv6 is used.
There are two parts to this.
Part 1: DNS
I'd like to have control over what IP protocol version is requested during the DNS resolution. This means hinting whether the A/AAAA records are requested during the resolution. The GaiResolver
relies on the getaddrinfo
under the hood, which has rich functionality allowing all the necessary flexibility, however, the API currently doesn't expose any of that. I know this might be due to the cross-platform compatibility needs, but I wonder what does it take to land it.
Part 2: Explicit IPv4 / IPv6 / Dual-stack sockets use in HttpConnector
The HttpConnector
has a lot of logic built-in to support both IPv4 and IPv6 sockets. However, as of right now, there's no way to explicitly make it use only IPv4, IPv6 or dual-stack. Given its internal complexity, I think the best route would be implementing a custom connector. I still wanted to mention it though, because it might be valuable feedback, and would welcome it if this functionality was available in the crate.