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.
Follow up of https://github.com/symfony/symfony/pull/54179#discussion_r1514886587
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.