On this page 5 sections
What a proxy DNS error means
Before your device can use a proxy, it has to resolve the proxy's host name, such as gate.proxyfield.io, to an IP address. When that lookup fails, there is nothing to connect to, and every app reports it in its own words:
| Where | What you see |
|---|---|
| Chrome, Edge | "No internet: There is something wrong with the proxy server, or the address is incorrect." with ERR_ |
| Firefox | "Unable to find the proxy server" |
| cURL | curl: (5) Could not resolve proxy: gate. |
| Python requests | ProxyError with a name-resolution message such as "Failed to resolve" or "Name or service not known" |
| Other apps, VPN and proxy clients | "Unknown proxy server", "proxy server not found" or a DNS error naming the proxy host |
Chrome's ERR_PROXY_CONNECTION_FAILED (net error -130) covers both a failed name lookup and a failed socket connection to the proxy (Chromium net_error_list.h); the error page text comes from Chromium's error page strings. cURL's exit code 5 is CURLE_COULDNT_RESOLVE_PROXY (libcurl error codes); the cURL fix is below.
How to fix an unknown proxy server error
Check the host name character by character. For ProxyField it is
gate.proxyfield.io, and the port,7000, goes in the port field. Common breakers in an app's or a system's proxy form:- a scheme in a host-only field (
http://gate.proxyfield.iowhere only the host belongs; on the cURL command line a scheme is fine); - the port typed into the host field (
gate.proxyfield.io:7000in a host-only box); - a leading or trailing space from copy and paste;
- the account's username typed where the host goes.
Where each value goes on each device: proxy server address and proxy port.
- a scheme in a host-only field (
Look the host up yourself. On Windows, macOS or Linux:
nslookup gate.proxyfield.ioOn macOS and Linux,
dig +short gate.proxyfield.iodoes the same in one line. An address back means DNS works and the problem is in your proxy settings. "Non-existent domain", "NXDOMAIN" or "can't find" means the lookup fails on this network.Try another DNS resolver. If the lookup fails on your default resolver, test a public one, for example
nslookup gate.proxyfield.io 1.1.1.1. If that works, your network's DNS is blocking or failing: change the DNS server in your network settings, or ask your network admin.Flush the DNS cache after a change, so the old failed answer isn't reused:
ipconfig /flushdnson Windows;sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderon macOS;resolvectl flush-cacheson Linux with systemd-resolved.Check for a hosts-file entry or a PAC script that overrides the proxy host. A stale entry in
/etc/hosts(orC:\Windows\System32\drivers\etc\hosts) wins over DNS. If your system uses automatic proxy setup, the PAC file may name a proxy host that no longer exists.Turn off the proxy if you didn't set one. An "unknown proxy server" error on a home computer often means old proxy settings from an app or extension; see how to turn off a proxy and proxy settings controlled by an extension.
When the lookup works but the connection still fails, the problem is the next step, the connection to the proxy: see cannot establish proxy connection.
Fix "curl: (5) Could not resolve proxy"
Exit code 5 is CURLE_COULDNT_RESOLVE_PROXY: cURL's documentation says the address of the given proxy host could not be resolved. cURL has not contacted the website yet. The causes are a wrong proxy name, a misbehaving DNS server, or a misconfigured system DNS (curl exit codes). Work through it in this order:
Find which proxy cURL is using. cURL reads
http_proxy,HTTPS_PROXY,ALL_PROXYandNO_PROXYfrom the environment (curl proxy environment variables), and-x/--proxyoverrides them (curl man page):env | grep -i proxyAn old host in one of these variables is the most common cause of error 5 when you did not type
-xat all. A.curlrcfile can also hold aproxy =line.Watch the request.
-vprints the proxy name cURL tries to resolve, so a typo or stray character shows up at once:curl -v -x http://gate.proxyfield.io:7000 -U "<login>-country-us-city-new_york:<password>" https://api.ipify.org-xtakeshost:port(gate.proxyfield.io:7000) or a URL with a scheme (http://gate.proxyfield.io:7000,socks5h://gate.proxyfield.io:7000); both work. A scheme breaks only a host-only field in a GUI, not-x.Resolve the proxy host yourself.
nslookup gate.proxyfield.io dig +short gate.proxyfield.ioNo address back means the problem is DNS on this machine or network (steps 3 and 4 in the section above). An address back, while cURL still says error 5, means cURL is resolving a different name: go back to step 1.
Prove the proxy settings are the cause. Send one request with every proxy setting ignored:
curl --noproxy '*' https://example.com # or clear the variables for one command only: env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY curl https://example.comIf that works, your internet connection and the website are fine, and the proxy configuration is at fault: fix or remove the variable, the
.curlrcline or the-xvalue.Check
NO_PROXY. Hosts listed inNO_PROXY/no_proxygo direct even when a proxy is set, so a request you expected to go through the proxy may not. More on--noproxyand the variables: cURL; setting them per shell: command-line proxy settings.
"Could not resolve host" (error 6) is different: the proxy is not in play, or the request went direct, and the lookup of the website's own name failed. With an HTTP proxy or socks5h://, the proxy resolves the website's name, so error 6 usually means the request did not go through the proxy at all.
Who resolves the website's name: you or the proxy?
"Proxy DNS" also means the second lookup: the website's host name.
| Proxy type | Who resolves the target's host name |
|---|---|
| HTTP and HTTPS proxy | The proxy: your client sends the host name in the request or in CONNECT |
SOCKS5 with remote DNS (socks5h:// in cURL and Python; "Proxy DNS when using SOCKS v5" in Firefox) | The proxy |
SOCKS5 with local DNS (socks5://) | Your device, which then sends only the IP to the proxy |
When the proxy resolves the name, your own resolver does not see the lookup. With local resolution, your resolver sees every site you visit, and a site with region-specific DNS may send you to the wrong region. Firefox's setting is explained on Firefox proxy setup.
ProxyField runs HTTP, HTTPS and SOCKS5 on the same gate.proxyfield.io:7000, with the same username and password; with socks5h://gate.proxyfield.io:7000 in cURL or Python, the gateway resolves the website's name.
Proxy DNS Errors FAQ
Why is my proxy hostname not working?
ProxyField proxies start at $1.95/GB on the gateway host gate.proxyfield.io (port 7000 in its own field), and a proxy hostname that is not working usually fails for 1 of 3 reasons: a typo or stray space, a scheme or port typed into the host field, or a DNS resolver that can't look it up. Run nslookup on the host: if it returns an address, fix the proxy settings; if not, try another DNS resolver.
What does "unknown proxy server" mean?
Your device couldn't resolve the proxy's host name to an IP address, so it never reached the proxy. Check the spelling of the host and your DNS.
What does curl's "Could not resolve proxy" error mean, and how do I fix it?
Exit code 5 means cURL couldn't turn the proxy host in -x, a proxy environment variable or .curlrc into an IP address, so it never reached the website. Print the variables with env | grep -i proxy, run with -v to see the name cURL tries, and look it up with nslookup or dig. If curl --noproxy '*' https://example.com works, fix or remove the proxy setting.
What is proxy DNS?
It is DNS resolution done by the proxy instead of your device: the proxy looks up the website's host name, so your own resolver does not see it. HTTP proxies always do it; SOCKS5 does it when you use remote DNS, such as socks5h://.
Does a proxy server use its own DNS?
For HTTP and HTTPS proxies, yes: the proxy resolves the website's name with its own resolver. For SOCKS5 it depends on the client setting: remote DNS uses the proxy's resolver, local DNS uses yours.
What is the difference between DNS and a proxy?
DNS turns host names into IP addresses; a proxy forwards your traffic and shows the website its own IP. Changing DNS doesn't change the IP a site sees, while a proxy does.
Do I need to change my DNS settings to use a proxy?
No. Your device only needs to resolve the proxy's host name, which any working resolver does; with an HTTP proxy or remote-DNS SOCKS5, the proxy resolves the websites for you. Change DNS only if your resolver can't look up the proxy host.
How do I make SOCKS5 resolve DNS through the proxy?
Use the socks5h:// scheme instead of socks5://: curl -x socks5h://gate.proxyfield.io:7000 -U "<login>:<password>" https://api.ipify.org, and the same scheme in a Python requests proxy URL (it needs requests[socks]). The proxy then looks up the website's name, so your local resolver neither sees nor blocks it.
Can DNS caching cause proxy connection problems?
Yes: a cached failed answer, or an old address after a change, can keep a proxy host from resolving. Flush the cache (ipconfig /flushdns on Windows) and try again.
Why does my proxy work on one network but not another?
The other network's DNS resolver may block or fail to resolve the proxy host, or its firewall may block the port. Compare nslookup gate.proxyfield.io on both networks, then test the port.