This commit changes something fundamental in the proxy handling. Previously the proxy was iterating over multiple possible IP addresses received from the source definition. The issue #1226 shows that this fails when mixing IPv4 and IPv6 results. This could be resolved by just taking the "right" addrinfo result, but this is executed after the socket has been created, hence: if we would have an IPv6 result, but created an IPv4 socket, we would miss all checks that happen upon socket creation.
The iteration over the getaddrinfo results has now been pulled into the proxy specific code, this might still be able to be abstracted.
This commit changes something fundamental in the proxy handling. Previously the proxy was iterating over multiple possible IP addresses received from the source definition. The issue #1226 shows that this fails when mixing IPv4 and IPv6 results. This could be resolved by just taking the "right" addrinfo result, but this is executed after the socket has been created, hence: if we would have an IPv6 result, but created an IPv4 socket, we would miss all checks that happen upon socket creation.
The iteration over the getaddrinfo results has now been pulled into the proxy specific code, this might still be able to be abstracted.