DEV Community

Cover image for SOCKS5 proxy not working? Every error, tested, with the fix
proxymint
proxymint

Posted on Originally published at proxymint.com

SOCKS5 proxy not working? Every error, tested, with the fix

Originally published on proxymint.

SOCKS5 proxy not working? The exact errors curl, Python requests, Node, Chrome and Firefox print for each mistake, from a dated loopback test, and each fix.

TL;DR

  • Read the exact words before changing anything. Two strings that look alike need different fixes. "No authentication method was acceptable" means no login was sent at all. "User was rejected" or "SOCKS5 authentication failed" means a login was sent and was wrong.
  • A hang or an "invalid version" usually means the wrong protocol on that port. Check the port before you blame the login. In curl, an HTTP port given as socks5h either timed out or printed "Received invalid version in initial SOCKS5 response", depending on the HTTP server.
  • Chrome cannot log in to a SOCKS5 proxy. Credentials in --proxy-server gave net::ERR_NO_SUPPORTED_PROXIES in Chrome 157, and Playwright refused at launch. A browser job with a login needs the HTTP endpoint.
  • If socks5 fails and socks5h works, the lookup moved, not the proxy. In the test, curl, requests and Node resolved localhost to ::1 and the IPv4 target refused it. Letting the proxy resolve the name fixed it.

Key takeaways

  • Run curl -v first, it shows which step broke. Look for "remotely resolved" or "locally resolved" in the output. Then read the number at the end of any "Can't complete SOCKS5 connection" line, which is the proxy's reply code (4 is a lookup failure, 5 a refused target).
  • In Python, install the extra and set both keys. Without PySocks, requests stops with "Missing dependencies for SOCKS support". The missing key is quieter. With only an https key, an http:// URL skipped the proxy without any error.
  • Don't put a socks URL in HTTP_PROXY for Node's built-in proxy. With NODE_USE_ENV_PROXY=1, Node 24.14.1 crashed at startup with "Invalid URL protocol", which is easy to miss in CI logs.
  • Test UDP on the exact server you'll use. PySocks relayed a datagram through one test server and microsocks answered 0x07, command not supported. curl, requests and Chrome never send UDP over SOCKS5 anyway.

Read the full guide on proxymint, with the commands, tables and sources.

Top comments (0)