cURL Error 5: Couldn't Resolve ProxyWhat cURL error 5 means
Exit code 5 maps to CURLE_COULDNT_RESOLVE_PROXY: curl was told to use a proxy — via -x/--proxy, a config file, or an environment variable — and the DNS lookup for that proxy's hostname returned nothing. The request failed at step zero; neither the proxy nor the target site was ever contacted.
Keep it separate from its siblings. Error 6 (couldn't resolve host) means the target hostname failed; error 7 means the proxy name resolved fine but the TCP connection was refused. Error 5 is specifically: this proxy name doesn't map to any IP address from where I'm standing.
Because the failing string is whatever curl parsed as the proxy hostname, malformed proxy URLs produce this error even when DNS is perfectly healthy. An unencoded @ in the password, a smart quote pasted from a document, or a trailing space can shift the parser so that a fragment of garbage becomes the hostname curl tries to resolve.