ResidentialIPs.org

Glossary Proxy features

Proxy authentication

By the ResidentialIPs Editorial TeamUpdated

Proxy authentication: Proxy authentication is how a proxy confirms you are allowed to use it, usually with a username and password or by accepting connections only from IP addresses you have registered.

Also called: proxy credentials, proxy login, proxy auth

Key takeaways

  • The two common methods are username/password and IP allowlisting.
  • HTTP proxies challenge with 407 and receive credentials in Proxy-Authorization.
  • SOCKS5 negotiates authentication in its handshake (RFC 1929).
  • Many providers encode targeting options (country, session) in the username.
  • Basic proxy credentials are not encrypted on the way to the proxy.

What is proxy authentication?

A commercial proxy must know which customer is sending traffic, both to bill usage and to keep strangers out. Proxy authentication is that check. Without it, the proxy would be an open proxy that anyone could abuse.

Methods compared

Username and passwordIP allowlisting
Works from any networkYesOnly from registered IPs
Tool supportMost tools, some lack itAny tool, no credentials needed
Carries targeting optionsYes, in the usernameNo, usually via ports instead
Risk if exposedAnyone with the credentials can use your planLow
Good forLaptops, changing networks, many sub-usersFixed servers, tools without auth support

How HTTP proxy authentication works

  1. The client sends a request (or CONNECT) without credentials.
  2. The proxy returns 407 Proxy Authentication Required with Proxy-Authenticate: Basic realm="proxy".
  3. The client repeats the request with Proxy-Authorization: Basic dXNlcjpwYXNz (base64 of user:pass).
  4. The proxy validates and forwards the request.

Most clients send credentials upfront when you put them in the proxy URL, so you rarely see the 407 step. Basic credentials are only encoded, so they travel in readable form unless you connect to the proxy over TLS.

How SOCKS5 authentication works

The client lists supported methods in its greeting. If the server selects username/password (method 0x02), the client sends the username and password in a short sub-negotiation defined by RFC 1929. The server replies with success or failure before any traffic flows.

Targeting in the username

Providers often turn the username into a settings string, for example customer-acme-country-de-city-berlin-session-9x2. This lets you change location or session without changing host or port. Read your provider’s documentation for the exact format.

Troubleshooting

SymptomLikely cause
407 on every requestWrong credentials, special characters not URL-encoded, IP not allowlisted
Works in curl, fails in a browserBrowser does not support credentials for that proxy type, use allowlisting or an extension
SOCKS5 connection refusedTool does not support SOCKS5 username/password

Choosing a method for your setup

SetupRecommended methodWhy
Script on a server with a fixed IPIP allowlistingNo credentials stored in code
Laptop on changing networksUsername and passwordWorks wherever you are
Browser or antidetect profilesUsername and password per profileEach profile can use different targeting
Shared team accessSeparate sub-users per personUsage tracking and easy revocation

Many providers let you create sub-users with their own passwords and traffic limits. Use them instead of sharing your main account password.

Keeping proxy credentials safe

  • Store credentials in environment variables or a secrets manager, not in code committed to a repository.
  • Rotate passwords if they appear in logs, screenshots or support tickets.
  • Remember that Basic authentication sends the password encoded but not encrypted. Over a plain HTTP connection to the proxy, anyone on the network path can read it.
  • Remove old allowlisted IPs when you change servers, so the next owner of that IP cannot use your plan.

Example: credentials in common tools

# curl
curl -x http://USER:[email protected]:8000 https://api.ipify.org

# environment variables read by many tools
export HTTPS_PROXY="http://USER:[email protected]:8000"

If the password contains special characters such as @ or :, URL-encode them, for example @ becomes %40. Unencoded special characters are a frequent cause of mysterious 407 errors.

Authentication and rotation

For rotating residential plans, the username often does double duty: it identifies your account and carries targeting and session settings. Changing the session part of the username gives you a new IP; keeping it the same keeps the IP. That is why mistakes in the username can show up as 407 errors or as unexpected locations.

Frequently asked questions

What does 407 Proxy Authentication Required mean?

The proxy did not receive valid credentials. Check the username and password, encode special characters, or add your IP to the allowlist.

Is IP allowlisting more secure than a password?

It cannot leak like a password, but it trusts anyone on the allowlisted IP. On shared networks or changing IPs, credentials are more practical.

Are proxy passwords encrypted?

Not with standard HTTP Basic or SOCKS5 username/password. They are readable to anyone on the network path to the proxy, unless the proxy connection itself uses TLS.

Why does my proxy keep asking for a password in the browser?

Browsers prompt for HTTP proxy credentials and some forget them between sessions. Allowlisting your IP, or using a profile manager that stores proxy credentials, avoids the prompt.

Can I use the same credentials on several machines?

Usually yes for username and password plans, subject to concurrency limits. Allowlisting needs every machine’s IP added.

Sources and further reading

Browse all 40 glossary terms Markdown version