Key Takeaways
A field checklist for determining where DNS resolution happens in HTTP and SOCKS proxy workflows and how to isolate local, proxy-side and target failures.
“DNS error” is often too vague to be actionable. The fastest route to a fix is to identify which name failed, where it was resolved, and whether the failure occurred before or after the proxy produced a response.
The four stages to separate
- Resolve the proxy endpoint. The client usually needs an address for
proxy.example.netbefore it can open a connection. - Connect to the proxy. DNS success does not prove the proxy port is reachable.
- Resolve the destination. This can happen locally or on the proxy side.
- Connect from the proxy to the destination. A valid DNS answer can still lead to routing, firewall, TLS, or target-policy failure.
Never collapse all four stages into “the proxy is down.”
Start with an evidence record
Keep credentials out of tickets and shell history.
Step 1: resolve the proxy hostname locally
If this lookup fails, check spelling, environment variables, search domains, split-horizon DNS, VPN filtering, container resolver configuration, upstream outages, and IPv4/IPv6 availability.
Step 2: test the proxy port
Interpret errors precisely:
- timeout: routing, firewall, filtering, or unavailable service
- connection refused: address reachable but no listener accepted the port
- TLS certificate error: relevant to an HTTPS proxy connection
407 Proxy Authentication Required: an HTTP proxy was reached and requested credentials
An HTTP 407 is not a DNS failure. See RFC 9110↗.
Step 3: determine who resolves the target
HTTP forward proxy and CONNECT
For ordinary HTTP proxy requests, the client sends a target authority to the proxy. For HTTPS tunneling, the client commonly sends CONNECT target.example:443; the proxy then needs to reach that authority. Implementations differ, so preserve the actual client trace rather than assuming a universal resolver path.
SOCKS5 local resolution
With curl, --socks5 resolves the destination locally.
SOCKS5 proxy-side resolution
The hostname form delegates destination resolution to the SOCKS5 proxy. See the curl manual↗ and SOCKS5 specification↗.
Controlled comparison matrix
| Local DNS mode | Proxy-side DNS mode | Likely investigation |
|---|---|---|
| Fails | Succeeds | Client resolver, VPN, split DNS, or local filtering |
| Succeeds | Fails | Proxy resolver, proxy policy, or proxy-to-target routing |
| Both fail before HTTP | Both fail before HTTP | Classify exact transport and negotiation errors |
| Both return HTTP | Both return HTTP | DNS likely completed; inspect auth and target response |
IPv4 and IPv6 mismatches
A hostname can return both A and AAAA records. Failures can appear when the client prefers IPv6 but lacks a working path, the proxy listener is IPv4-only, or the proxy resolves a target to an unreachable IPv6 address.
Do not force one family permanently until the other path is understood.
NXDOMAIN, SERVFAIL, and timeout are different
NXDOMAIN: the resolver says the name does not existSERVFAIL: the resolver could not complete the query- timeout: no usable response arrived within the client limit
- empty answer: the name may exist without the requested record type
Preserve the resolver response rather than paraphrasing every result as “not found.”
DNS caching can hide the result
The operating system, runtime, browser, local forwarder, container, proxy, and upstream resolver can each cache answers. Record TTLs where possible and avoid flushing production caches without understanding the impact.
Do not misuse --resolve
The address is documentation-only. --resolve can isolate a local DNS variable for an authorized target, but it can bypass load balancing or select the wrong address family. It does not change how the proxy endpoint hostname is resolved.
Browser-specific checks
When curl works but a browser fails, capture browser version, launch proxy settings, secure-DNS policy, browser trace, connection reuse, final URL, and exact error name. Test a fresh context or process so existing connections do not hide route changes.
Common mistakes
- treating
407as DNS - testing only the real target
- changing protocol while debugging
- disabling TLS validation
- publishing real endpoints and credentials
Decision checklist
- Can the client resolve the proxy hostname?
- Can it connect to the correct port?
- Did the proxy return an HTTP response?
- Who resolves the destination?
- Do A and AAAA paths differ?
- Does a neutral HTTPS target work?
- Does the permitted real target behave differently?
- Are caches or reused connections affecting the comparison?
Related BytesFlows resources
- Detailed local-versus-remote DNS guide
- HTTP vs SOCKS5 residential proxies
- Proxy TLS certificate troubleshooting
- Proxy environment variables with curl
- Proxy setup guide
Before applying the checklist
The commands use documentation hostnames and are intended as diagnostic patterns. Replace them with endpoints and targets you are authorized to test, then record the observed route, resolver behavior, geography, and response from your own environment before drawing account-specific conclusions.
Alex Vance
Lead Proxy Network Architect
Reviewed by the BytesFlows engineering team. Examples are written for compliant public-web data collection, QA, SEO monitoring, and market research workflows. Results can vary by target site, country, client runtime, and request rate.