All locations active · 99.99% uptime
SOCKS5

How Does SOCKS5 Authentication Work?

In SOCKS5, authentication is not done with a header as in an HTTP proxy, but with a separate sub-negotiation . This difference also explains why the error messages are so vague: when the wrong method is offered, the server does not return an explanatory text — it sends a single byte and closes the connection.

Method Negotiation

FIGUREThe SOCKS5 authentication negotiation
NEGOTIATIONClientSOCKS5 server0x05 0x02 0x00 0x02 (version + 2 methods)0x05 0x02 (username/password selected)0x01 len user len passRFC 1929 sub-negotiation0x01 0x00 (success)CONNECT target:port0x05 0x00 (connection established)

Each step is a few bytes in one direction. If the negotiation fails, the server returns 0xFF or 0x01 0x01 and closes the connection — there is no explanatory error text.

Supported Methods

CodeMethodUsage
0x00No authentication requiredServers protected by an IP whitelist
0x01GSSAPICorporate Kerberos environments (rare)
0x02Username / passwordThe most common commercial method
0xFFNo acceptable methodThe server's rejection response
Security

The username and password are sent in plain text . SOCKS5 does not encrypt anything on its own. If you use it on an untrusted network your credentials can be read; in that scenario, working over an SSH tunnel is safer.

Common Problems

FIGURESOCKS5 authentication errors
ERRORCODE / SYMPTOMLIKELY CAUSESOLUTIONThe connection closed silentlyThe client does not offer method 0x02Use a client/library that supports authentication0x01 0x01 returnedThe username or password is wrongCopy the credentials again from the panelNo credentials requested butrejectedConnecting from outside the IP whitelistAdd your public IP to the panelCorruption with special charactersUnencoded character in the URLPercent-encode the password or use a separate fielduseThe browser does not ask for a passwordThe browser does not support SOCKS authenticationUse a local bridge proxy

The browser row matters: many browsers do not support SOCKS5 authentication in their interface. In that case you need a local bridge that carries the credentials.

The Browser Problem and Its Solution

Chrome's and Firefox's SOCKS5 authentication support is limited or non-existent. There are two practical solutions:

01

Switch to an IP whitelist

If your provider supports it, this is the cleanest solution: no credentials are sent at all and the browser works without a problem.

02

Set up a local bridge

Run a small proxy on the machine that carries the credentials and point the browser to 127.0.0.1 . You can find the method in our proxy chaining article in detail.

Configuration by Library

FIGURESupplying the username and password correctly
SOCKS5 credentials in different languages01# curl — with a separate option (no URL-encoding hassle)02curl --socks5-hostname proxy.example.com:1080 \\03 --proxy-user "kullanici:sifre" https://example.com0405# Python — requests[socks]06proxies = {"https": "socks5h://kullanici:sifre@proxy.example.com:1080"}07r = requests.get("https://example.com", proxies=proxies, timeout=25)0809# Python — httpx10import httpx11with httpx.Client(proxy="socks5://kullanici:sifre@proxy.example.com:1080") as c:12 r = c.get("https://example.com")1314# Node.js — socks-proxy-agent15import { SocksProxyAgent } from "socks-proxy-agent";16const agent = new SocksProxyAgent("socks5h://kullanici:sifre@proxy.example.com:1080");

If your password contains @, : or / , use a separate field instead of the URL format; otherwise you will need to percent-encode it.

Comparison with Whitelisting

Both models apply to SOCKS5 as well, and the selection criteria are the same as with an HTTP proxy. For a detailed comparison, see our our article on authentication methods . The only SOCKS5-specific difference is the browser support problem: a whitelist eliminates it completely.

Verification

FIGUREProving that authentication works
Terminal01# Watch the negotiation with verbose output02curl -v --socks5-hostname proxy.example.com:1080 \\03 --proxy-user "kullanici:sifre" https://example.com 2>&1 | head -200405# If successful: a line similar to "SOCKS5 request granted"06# If it fails: "Unable to receive initial SOCKS5 response" or07# "User was rejected by the SOCKS5 server"0809# Test with a wrong password and see the error (to learn the behavior)10curl -v --socks5-hostname proxy.example.com:1080 \\11 --proxy-user "kullanici:yanlis" https://example.com 2>&1 | grep -i socks

Testing deliberately with a wrong password makes it easier to recognize the error message when you run into a real problem.

Summary

SOCKS5 authentication is done through a separate sub-negotiation, and the error messages are not explanatory. The two most common problems are the client never offering the authentication method and browsers not supporting that method. Because credentials are sent in plain text, be careful on untrusted networks. A whitelist is the cleanest solution, removing both the browser problem and the leak risk. To test your addresses, our proxy checker tool you can use.

Frequently Asked Questions

01Is the SOCKS5 password sent encrypted?

No, it is sent in plain text. SOCKS5 does not encrypt anything on its own. On untrusted networks, assume that your credentials can be read.

02Why is/isn't the SOCKS5 password requested in Chrome?

Chrome's SOCKS5 authentication support is limited and varies by version. The most reliable solution is to use an IP whitelist or to run a local bridge proxy that carries the credentials.

03The connection closes immediately with no error message — why?

The server may have returned 0xFF (no acceptable method) and closed the connection. That means your client never offered the username/password method.

04My password contains special characters, how should I write it?

Use the client's separate credential field instead of the URL format (--proxy-user in curl). If you have no choice, percent-encode it: 40% instead of @, 3%A instead of :.

05Can I use an IP whitelist with SOCKS5?

Yes, and in most scenarios it is more practical. The server selects the 0x00 (no authentication required) method, no credential configuration is needed on the client side, and the browser problem disappears.

Related Articles and Pages

NEXT STEP

Strengthen your proxy setup today.

Get started in minutes with a paid plan, or try our free proxy list first.

FREEPROXY.TR

Looking for a free proxy? You're in the right place

A complete proxy platform where you can browse up-to-date free proxy addresses, compare HTTP and SOCKS proxy types, and check your proxy connections with free tools.