Follow up of symfony/symfony#54179 (comment)
Reading DnsSocketConnector, there is no easy way currently to hook between resolve() and stream_socket_client(). Providing a custom resolver doesn't help because of the inet_pton($host) shortcut.
Hooking here is useful for e.g. Symfony's NoPrivateNetworkHttpClient so that it can filter the remote host before trying to connect to it.