Troubleshooting
Error codes
What the proxy, the SOCKS5 handshake and curl tell you when something goes wrong, and what to do about each. Search this page for the number you see.
Updated 16 October 2026
Proxy or site?#
First work out who answered. With an HTTPS site, curl -v shows the proxy's reply to the CONNECT line before any TLS. An error there comes from the proxy. An error after the TLS handshake comes from the website itself, and the proxy only carried it.
HTTP status from the proxy#
| Code | Meaning here | What to do |
|---|---|---|
| 400 Bad Request | Most often a SOCKS5 client talking to an HTTP port | On ISP and datacenter, SOCKS5 is on the port plus one |
| 402 Payment Required | Residential traffic balance is used up | Buy more traffic, the lines resume by themselves |
| 403 Forbidden | The target is in a blocked category, or a residential line has an outdated login and every site fails | Blocked categories cannot be unlocked. For residential, generate fresh lines |
| 407 Proxy Authentication Required | Wrong credentials, a rotated password, or a whitelist that does not include you | Copy the credentials again from the order, or add your address to the whitelist |
| 502 Bad Gateway | The proxy could not get an answer from the target, or the exit device dropped | Retry. On residential retry with a new session |
| 503 Service Unavailable | Temporarily no capacity for the request, for example in a narrow residential location | Retry with a pause, or widen the location |
| 504 Gateway Timeout | The target took too long to answer | Retry, and check the target without the proxy |
SOCKS5 replies#
SOCKS5 clients usually print the reply code from the handshake. The meanings are standard:
| Reply | Meaning | Usual cause here |
|---|---|---|
| Authentication failed | Username or password rejected | Same as 407 above |
| 0x01 general failure | The proxy could not complete the request | A blocked target, an outdated residential line, or UDP asked for on a line without it |
| 0x02 not allowed by ruleset | The request is refused by policy | A blocked target |
| 0x03 network unreachable | No route to the destination | Retry, or check the target |
| 0x04 host unreachable | The destination host does not answer | The target is down or the name does not resolve |
| 0x05 connection refused | The destination refused the connection | Nothing listens on that port of the target |
| 0x07 command not supported | The client asked for something the proxy does not do there | UDP on a port or line that does not carry it, see UDP |
curl exit codes#
| Exit code | Meaning | What to check |
|---|---|---|
| 5 | Could not resolve the proxy host | A typo in the host, or DNS on your machine |
| 6 | Could not resolve the target host | The target domain, or use socks5h:// to resolve it on the proxy |
| 7 | Could not connect to the proxy | Host, port and your firewall. On ISP and datacenter, the right port for the protocol |
| 28 | Timed out | A closed target port, a slow target, or a firewall |
| 35 | TLS handshake failed | Often an HTTP proxy given as https://. Use http:// for the proxy URL |
| 56 | Failure receiving data, often CONNECT aborted | Read the proxy's reply with -v, it is usually a 4xx above |
| 97 | Proxy handshake failed | SOCKS5 to an HTTP port, or wrong SOCKS5 credentials |
Didn't find the answer?
Support answers in the chat on this site around the clock. On Telegram the reply usually comes fastest, and a ticket gets an answer by email.