Does Laminas provide a way to configure a custom DNS resolver for its HTTP client Socket adapter?
0 reputation · 15 May 2022, 01:46 UTC
Goal: Assess whether developers can override the system DNS resolver used by Laminas\Http\Client\Adapter\Socket when making HTTPS requests.
Uncertainty: The adapter currently forwards only host, port, and timeout to PHP’s fsockopen/stream_socket_client, leaving DNS resolution to the underlying OS and offering no built‑in way to inject custom resolvers or DNS‑over‑HTTPS endpoints. This raises the question of whether a configuration point should be added to support split‑horizon or internal DNS environments.
Does Laminas provide a mechanism to specify custom DNS servers for the Socket adapter? If not, what are the implications for applications that need to bypass the system resolver? Should the library expose an option to supply a resolver callback or DNS server list?