Troubleshooting 4 min read

SOCKS5 Authentication Failed: How to Fix It in curl, Python and Browsers

SOCKS5 gives you far less feedback than HTTP proxies do. Here's how to get a readable error, and the client limitations that cause most failures.

SOCKS5 authentication failed means the SOCKS server didn't accept the username and password your client offered, or your client didn't offer any. SOCKS5 has no HTTP status codes, so instead of a clear 407 you get messages like curl's "User was rejected by the SOCKS5 server" or "No authentication method was acceptable", or Python's SOCKS5AuthError. This guide shows how to narrow it down, including the client limitations that cause a surprising number of these errors.

How SOCKS5 Authentication Works

When your client connects, it lists the authentication methods it supports: typically "no authentication" and "username/password" (defined in RFC 1929). The server picks one. If the server requires username/password and the client only offered "no authentication", the handshake ends with "no acceptable methods". If the client offered credentials and they're wrong, the server rejects them. Those are two different failures with two different fixes.

  • "No authentication method was acceptable" / "All offered authentication methods were rejected": your client never sent credentials. It either doesn't support SOCKS5 auth or didn't receive them in the config.
  • "User was rejected by the SOCKS5 server" / "SOCKS5 authentication failed": credentials were sent and refused. Check the username, password and plan.

Trick: Test the Same Credentials over HTTP

Because SOCKS5 can't tell you why it refused, try the identical credentials on the HTTP endpoint, which returns readable status codes:

# SOCKS5 (port 1080)
curl -v --proxy socks5h://USERNAME:[email protected]:1080 https://api.ipify.org

# Same credentials over HTTP (port 8080)
curl -v -x http://USERNAME:[email protected]:8080 https://api.ipify.org

On the HTTP endpoint, 407 means the username or password is wrong or the plan isn't active, and 402 means the plan is out of bandwidth. If HTTP works and SOCKS5 doesn't, the credentials are fine and the problem is in your SOCKS client configuration.

Fix 1: Credentials and Encoding

  1. Copy the username and password from the dashboard again instead of retyping.
  2. Keep options in the username: USERNAME-country-us or USERNAME-session-abc123-time-10. Adding them to the password breaks authentication.
  3. URL-encode special characters in the password when it's inside a URL. @ becomes %40, : becomes %3A, # becomes %23, / becomes %2F. An unencoded @ splits the URL in the wrong place.
  4. Keep each of username and password within 255 bytes; that's the protocol limit for SOCKS5 username/password authentication.

Fix 2: Use a Client That Supports SOCKS5 Auth

Not every SOCKS client can send credentials:

  • Chrome and other Chromium browsers don't support SOCKS5 with username and password. With --proxy-server=socks5://..., Chrome connects without credentials and the server rejects it. Use the HTTP endpoint (port 8080) in Chrome instead; see how to set up a proxy in Chrome.
  • Playwright's Chromium has the same limitation for authenticated SOCKS5. Use an http:// server with username and password in the proxy object.
  • Firefox supports SOCKS5, but its connection settings dialog has no fields for SOCKS credentials. Use the HTTP proxy fields instead, or an extension that supports authenticated proxies.
  • Operating system SOCKS settings on Windows and macOS generally don't pass credentials to every app reliably.
  • curl, Python with PySocks, and Node with socks-proxy-agent do support authenticated SOCKS5.

Fix 3: Python Setup

requests needs the optional SOCKS dependency. Without it you get "Missing dependencies for SOCKS support", which people sometimes misread as an auth failure:

# pip install "requests[socks]"
import requests

PROXY = "socks5h://USERNAME:[email protected]:1080"
proxies = {"http": PROXY, "https": PROXY}

r = requests.get("https://api.ipify.org", proxies=proxies, timeout=30)
print(r.text)

Use socks5h:// rather than socks5:// so hostnames are resolved by the proxy, not your machine. That avoids DNS leaks and errors on hostnames your local resolver can't see. More in proxy DNS resolution errors.

Fix 4: Port and Scheme

SOCKS5 runs on global.nodeproxies.xyz:1080. A SOCKS client pointed at 8080 is talking to an HTTP proxy and will fail the handshake with a confusing error, and an HTTP client pointed at 1080 fails the other way around. SOCKS5 vs. HTTP proxies explains when to choose each, and what is a SOCKS5 proxy covers the protocol.

Fix 5: Plan Status

If the HTTP test above returns 407 or 402, the issue is the plan, not the protocol. Check the dashboard for remaining bandwidth and status.

Using SOCKS5 with NodeProxies

All NodeProxies plans work over both HTTP on 8080 and SOCKS5 on 1080 with the same username and password. The proxy format converter turns host:port:user:pass into socks5h:// URLs. Sign up to get credentials.

FAQ

Why does SOCKS5 authentication fail in Chrome?

Chrome doesn't support SOCKS5 with username and password, so it connects without credentials and gets rejected. Use the HTTP proxy endpoint in Chrome.

What does "No authentication method was acceptable" mean?

Your client didn't offer username/password authentication. Check that credentials are in the proxy URL or config and that the client supports SOCKS5 auth.

Should I use socks5 or socks5h?

Use socks5h in most cases. It sends hostnames to the proxy for resolution, which avoids local DNS leaks and lookup failures.

NodeProxies

Ready to get started?

90M+ residential, mobile & datacenter proxies. Datacenter from $0.30/GB, residential from $0.42/GB. No contracts.

Create free account