Proxy Authentication: Login and Password or IP Whitelist?

Last updated: 2026-11-24
Published: 2025-11-07
1104

Content

A proxy checks who you are in one of two ways: by a login and password that your software sends with every connection, or by your IP address on a whitelist in the provider's dashboard. We ran login-and-password authentication through 20 client setups in Python, Node, curl and three browser engines. The most common failure was a password with @, #, / or ? pasted into a proxy URL without encoding. Provider limits on this page were checked in their documentation in November 2026.

Short answer

✅ Default choice

Login and password

Works from home, 4G, a laptop in a café and a server. The only option for SOCKS5 in most tools.

✅ A server with a fixed IP

IP whitelist

No secret in your code. Also the way to use a proxy in a browser or app that has no password field.

⚠️ Avoid

Whitelisting a home or office IP

It changes, and everyone behind the same address can use your proxy.

How each method works

With a login and password, the proxy first answers your software with code 407, "Proxy Authentication Required". The software repeats the request with a Proxy-Authorization header that carries your login and password in Base64. For an HTTPS site this happens on the very first line, the CONNECT request that opens the tunnel, before any encryption starts. SOCKS5 does the same in its own handshake.

Two lanes compared. Left, login and password: software sends request, proxy answers 407 Proxy Authentication Required, software repeats with Proxy-Authorization: Basic header, proxy lets you in. Right, IP whitelist: software sends host and port, proxy checks the address against the dashboard list, lets you in, no login sent.

With a whitelist, the proxy sends nothing back. It looks at the address the connection came from, and if that address is on your list, it lets you in. Your software only needs the host and port.

Login and password or IP whitelist

Login and passwordIP whitelist
Works when your IP changesYesNo, you update the list each time
Something that can leakThe password, in code, logs or screenshotsNothing, but anyone on your IP gets in
Browsers and apps without a password fieldNeed an extension or a workaroundWork with host and port only
SOCKS5Supported by most toolsNot offered by some providers, see the table below
Country and sessionWritten into the loginSet in the dashboard, by port or host name
Several machinesThe same login everywhereEach IP goes on the list

Which one to use

Home internet or a phone

Login and password. A home IP changes after a router restart or at the provider's will, and on 4G it changes all the time. Many mobile and some home connections also sit behind a shared carrier address (CGNAT), so whitelisting it lets in every subscriber behind that address.

Decision tree. Question: is the IP fixed and only yours? Yes, server or VPS, leads to whitelist or login. No, home, 4G, office or carrier address, leads to login and password, marked default. Special cases: app with no password field leads to IP whitelist, SOCKS5 in a browser to whitelist or HTTP port.

A server or VPS

Either works. A whitelist keeps the password out of your code and logs. Add the server's public IP, the one curl https://ipinfo.io/ip prints on the server without a proxy, not the address of its network card.

A team behind one office IP

Login and password, one sub-user per person where the provider has them. A whitelisted office IP gives the proxy to everyone in the office and to their guests on the Wi-Fi.

An antidetect browser

Login and password, typed into the proxy fields of each profile. Antidetect browsers have their own fields for the login and password, so the browser limits below do not apply to them. See our multi-accounting guide for the full setup.

A phone without an app

On iPhone the Wi-Fi proxy settings have an "Authentication" switch with login and password fields. On Android the Wi-Fi proxy has only host and port, so use a whitelist or a proxy app there.

How providers set up each method

Most providers offer both methods. The details differ, and two of them matter: how many IPs you can whitelist and how you choose a country without a login.

ProviderMethodsIPs on the whitelistCountry and session with a whitelist
Proxy SellerBoth, on one orderLimited, no number given. IPv6 accepted, ranges notSet in a proxy list in the dashboard
NodeMavenBoth for rotating and mobile, ISP only by loginNot statedSet in each whitelist entry, the dashboard builds the endpoints
GeonixBothNot statedSet in a proxy list in the dashboard
IPRoyalBoth for rotating, ISP and datacenterNot statedSaved with each whitelist entry
WebshareBoth, at the same time1 per account, more as a paid add-onChosen by port
OxylabsBoth, not mixed on one connection10 IPv4Written into the host name. No SOCKS5 with a whitelist
DecodoBoth10, more through support. No IPv6Written into the host name
Bright DataLogin always, the whitelist is an extra lockNo limit, ranges acceptedThrough its Proxy Manager
EvomiLogin onlyNo whitelistWritten into the password
Proxy-CheapBoth for static, rotating and mobile only by loginNot stated, changes once per 30 minutesChosen in the dashboard

None of these providers says how fast a new whitelist entry starts working, and none lists the characters allowed in a proxy password.

NodeMaven sets the country, session type and protocol in the same window where you add the IP, and builds the endpoints for it right away.

NodeMaven: Add IP Whitelist window with country, session type and protocol

Proxy Seller first adds the IP on its own, one IP to one proxy list.

Proxy Seller: Whitelist IP tab and Add IP window

The method is chosen later, when you create a proxy list: "Username & Password" or "By IP".

Proxy Seller: creating a proxy list with authorization by IP

Which tools accept a proxy password

We ran each tool against our own test proxy that asks for a login and password over HTTP and over SOCKS5.

ToolHTTP proxy with passwordSOCKS5 with password
curlYesYes
Python requestsYesYes, with requests[socks]
Python httpxYesYes, with httpx[socks]
Python aiohttpYesYes, with aiohttp-socks
Node: undici, axiosYesThrough socks-proxy-agent
Playwright: Chromium, Firefox, WebKitYes, in the proxy optionNo: "Browser does not support socks5 proxy authentication"
Chromium with --proxy-server=http://user:pass@…No: ERR_NO_SUPPORTED_PROXIESNo

So for a browser with SOCKS5, either whitelist your IP or switch to the provider's HTTP port. Webshare and Proxy Seller's rotating proxies, for example, accept both protocols with the same login.

Special characters in the password

A proxy URL has the shape http://login:password@host:port, so characters that mean something in a URL break it. We set the test proxy to nine passwords and pasted each into every client as is and percent-encoded.

Character in the passwordPasted as isPercent-encoded
: (colon)Works everywhereWorks everywhere
@curl fails, Python and Node workWorks everywhere
# / ?Fails in every clientWorks everywhere
% (percent)Node undici failsWorks everywhere
Spacecurl failsWorks everywhere
Cyrillic lettersPython requests and aiohttp failThe same two still fail

When the password went into a separate field instead of the URL (curl -U, aiohttp proxy_auth, axios auth, Playwright password), every character worked, except Cyrillic in aiohttp. Requests and aiohttp encode the header in Latin-1, so a password with letters outside it never reaches the proxy. Keep proxy passwords to Latin letters and digits, and percent-encode anything else.

Errors and what they mean

What you seeWhat it meansWhat to do
407 Proxy Authentication Required, curl CONNECT tunnel failed, response 407The proxy did not accept the login and password, or got noneCopy them again from the dashboard. If you use a whitelist, check that your current IP is on it
Python InvalidURL: Failed to parse or Invalid port, curl Unsupported proxy syntaxA character in the password broke the URLPercent-encode the password
curl User was rejected by the SOCKS5 serverWrong login or password on a SOCKS5 portCheck them, or the port: some providers use a different port for SOCKS5
curl No authentication method was acceptableThe SOCKS5 port wants a password and you sent noneAdd the login and password, or whitelist your IP
A headless browser hangs on an HTTPS page until the timeoutIt waits for a login window that nobody fillsPass the login and password in the browser's proxy option
ERR_NO_SUPPORTED_PROXIES in ChromiumThe login and password are in the --proxy-server flagRemove them and use a whitelist, an extension or Playwright

Who can see your proxy password

Anyone on the network between you and the proxy, on a plain HTTP or SOCKS5 connection. This is what we captured between curl and our test proxy while opening an HTTPS site:

CONNECT auth-test.example:443 HTTP/1.1
Proxy-Authorization: Basic dXNlcjpTM2NyZXQtUGFzcw==

The last line decodes to user:S3cret-Pass with one command. Through SOCKS5 the password went out as plain text. The site itself stays encrypted, only the proxy login is exposed. On public Wi-Fi that is enough for someone to use your traffic.

Connect to the proxy over TLS

Evomi, Oxylabs and Decodo have proxy ports with an encrypted connection to the proxy itself. NodeMaven and Proxy Seller's rotating residential proxies do not offer one.

Use sub-users

NodeMaven, IPRoyal and Webshare let you create separate logins with their own passwords and limits. A leaked login then costs one sub-user, not the whole account.

Keep the password out of the code

Read it from an environment variable, not from a line in a script that ends up in Git or a screenshot. After a leak, change it in the dashboard. At NodeMaven a new password stops every proxy string made with the old one.

Examples to copy

curl, with the password in a separate option so no encoding is needed:

curl -x http://gate.example.com:8080 -U 'login:p@ss#word' https://ipinfo.io/json

Python requests, with the password encoded:

import os, requests
from urllib.parse import quote
pw = quote(os.environ["PROXY_PASS"], safe="")
proxy = f"http://login:{pw}@gate.example.com:8080"
print(requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}).text)

Node with undici:

import { ProxyAgent, fetch } from 'undici'
const pw = encodeURIComponent(process.env.PROXY_PASS)
const agent = new ProxyAgent(`http://login:${pw}@gate.example.com:8080`)
console.log(await (await fetch('https://ipinfo.io/json', { dispatcher: agent })).text())

Playwright:

const browser = await chromium.launch({
  proxy: { server: 'http://gate.example.com:8080', username: 'login', password: process.env.PROXY_PASS }
})

Providers with both methods

All four have both a login and a whitelist on rotating residential proxies. NodeMaven builds the whitelist endpoints for you, Proxy Seller and Geonix use the same proxy list setup.

Rotation Residential Proxies · from $2.20/GB
Visit Website
Paid test for $3.50✓ Tested by us · December 2026−35%CAPYRATE35
Rotation Residential Proxies · from $1.30/GB
Visit Website
24-hour refund window✓ Tested by us · November 2026−10%QALCDK_843602
Rotation Residential Proxies · from $0.55/GB
Visit Website
Paid test for $1.9924-hour refund window−5%14XuoKynMW
Rotation Residential Proxies · from $1.84/GB
Visit Website

How we checked

On 24 November 2026 we ran our own test proxy with HTTP and SOCKS5 on the same machine as the clients: curl 8.5, Python requests, httpx and aiohttp, Node 24 with undici, axios and socks-proxy-agent, and Chromium, Firefox and WebKit through Playwright. Each of nine passwords went into each client as is, percent-encoded and, where the client has one, in a separate field. The capture above was taken on the same machine. Provider rules come from their own documentation, read the same day, and the dashboard screenshots were taken on our accounts.

FAQ

  • Which is more secure, IP whitelist or login and password?
    • A whitelist has no password to leak, but it trusts everyone behind your IP: an office, a carrier's shared address or a hotel Wi-Fi. A login and password is safer when the IP is not yours alone. On a server with its own fixed IP, a whitelist is the safer choice.
  • Why do I get error 407?
    • The proxy did not accept your login and password, or your software sent none. Copy them again from the dashboard and percent-encode the password if it has @, #, / or ?. With a whitelist, check that your current IP is on the list.
  • Can I use a password with SOCKS5 in Chrome?
    • No. In our test Chromium, Firefox and WebKit all refused SOCKS5 with a password. Use the provider's HTTP port with the same login, whitelist your IP or use an antidetect browser, which has its own login fields.
  • Can I choose a country with IP authorization?
    • Yes, but not in the login. Depending on the provider it is set in the whitelist entry or proxy list in the dashboard (NodeMaven, Proxy Seller, IPRoyal), by port (Webshare) or in the host name (Oxylabs, Decodo).
  • How many IPs can I whitelist?
    • It depends on the provider: Webshare allows 1 per account by default, Oxylabs and Decodo 10, Bright Data has no limit. Most others do not publish a number.
  • Can I use both methods at once?
    • Some providers allow it on one account, Proxy Seller and Webshare among them. Oxylabs asks you not to mix them on one connection, and Proxys.io answers 407 when both are sent.
  • Is my proxy password encrypted?
    • Not on a plain HTTP or SOCKS5 connection. It travels in Base64 or plain text, and the site behind it stays encrypted. Evomi, Oxylabs and Decodo have proxy ports with TLS that hide the login too.

Leave a comment