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#

CodeMeaning hereWhat to do
400 Bad RequestMost often a SOCKS5 client talking to an HTTP portOn ISP and datacenter, SOCKS5 is on the port plus one
402 Payment RequiredResidential traffic balance is used upBuy more traffic, the lines resume by themselves
403 ForbiddenThe target is in a blocked category, or a residential line has an outdated login and every site failsBlocked categories cannot be unlocked. For residential, generate fresh lines
407 Proxy Authentication RequiredWrong credentials, a rotated password, or a whitelist that does not include youCopy the credentials again from the order, or add your address to the whitelist
502 Bad GatewayThe proxy could not get an answer from the target, or the exit device droppedRetry. On residential retry with a new session
503 Service UnavailableTemporarily no capacity for the request, for example in a narrow residential locationRetry with a pause, or widen the location
504 Gateway TimeoutThe target took too long to answerRetry, and check the target without the proxy

SOCKS5 replies#

SOCKS5 clients usually print the reply code from the handshake. The meanings are standard:

ReplyMeaningUsual cause here
Authentication failedUsername or password rejectedSame as 407 above
0x01 general failureThe proxy could not complete the requestA blocked target, an outdated residential line, or UDP asked for on a line without it
0x02 not allowed by rulesetThe request is refused by policyA blocked target
0x03 network unreachableNo route to the destinationRetry, or check the target
0x04 host unreachableThe destination host does not answerThe target is down or the name does not resolve
0x05 connection refusedThe destination refused the connectionNothing listens on that port of the target
0x07 command not supportedThe client asked for something the proxy does not do thereUDP on a port or line that does not carry it, see UDP

curl exit codes#

Exit codeMeaningWhat to check
5Could not resolve the proxy hostA typo in the host, or DNS on your machine
6Could not resolve the target hostThe target domain, or use socks5h:// to resolve it on the proxy
7Could not connect to the proxyHost, port and your firewall. On ISP and datacenter, the right port for the protocol
28Timed outA closed target port, a slow target, or a firewall
35TLS handshake failedOften an HTTP proxy given as https://. Use http:// for the proxy URL
56Failure receiving data, often CONNECT abortedRead the proxy's reply with -v, it is usually a 4xx above
97Proxy handshake failedSOCKS5 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.