Proxy IP Whitelist vs Username Password: Picking a Login Method

· Updated:

With IP whitelisting (an IP allow-list), a proxy accepts connections from the public IP addresses you register and needs no password, while username and password authentication accepts a connection from anywhere as long as the client sends valid credentials. Allow-lists suit a server with a fixed public IP and software that cannot send credentials; username and password suits home connections, laptops, cloud workers and anything whose IP changes. The catch with credentials is that every tool must be able to send them, and you must keep them out of code and logs.

User/pass lines work from any network

Proxy IP whitelist vs username password: how each works

Both methods stop strangers from using a proxy you pay for. They check different things: allow-listing checks where the connection comes from, credentials check what the client knows.

QuestionIP allow-list (whitelist)Username and password
What the proxy checksThe source IP of the connectionCredentials sent by the client
Works from a changing IPNo, until you update the listYes
What the client must supportOnly host and portProxy authentication (most libraries and tools do)
Who else can use itAnyone sending from an allowed IPAnyone who has the credentials
Main riskA shared or reassigned IP lets others inLeaked credentials work from anywhere

IP allow-list authentication

You register one or more public IPv4 addresses with the provider. When a connection arrives, the proxy compares its source address with the list and either relays it or refuses. The client sends no login at all, so the tool only needs IP:PORT. What a refused client sees depends on the server: some close the connection, some return an error such as 407 or 403.

Username and password authentication

For an HTTP proxy, the client sends a Proxy-Authorization: Basic header containing the username and password in base64. On plain http:// requests it goes with every request; for https:// sites it goes with the CONNECT request that opens the tunnel. If the header is missing or wrong, the proxy answers with 407 Proxy Authentication Required. For SOCKS5, the client and server negotiate username and password authentication (RFC 1929) before the connection request.

Base64 is an encoding, not encryption, and SOCKS5 credentials are also sent in clear text. Anyone who can watch the path between you and the proxy can read them, so use a password unique to the proxy and keep the traffic itself on HTTPS.

Where each method breaks

Most authentication problems come from a mismatch between the method and where your software runs.

  • Home connections with dynamic IPs. Many consumer ISPs change your public IP from time to time, for example after a router restart. With an allow-list, every change stops the proxy working until someone updates the list.
  • Cloud and serverless workers. Instances, containers and functions often get a new public IP each time they start. Allow-listing them only works if you route their outbound traffic through a fixed address, such as a cloud NAT gateway with a static IP.
  • CGNAT and shared networks. On mobile data and some home connections, many subscribers share one public IP. Allow-listing that address allows everyone behind it. On an office network, any device on the network can use an allow-listed proxy.
  • Credentials in the wrong place. With username and password, the risk moves to secrets handling: lines pasted into scripts, committed to repositories, printed in logs or visible in screenshots. Load them from environment variables or a secrets manager.
  • Tools without login fields. Some software only accepts host and port, which is where allow-listing is most convenient.

When your software cannot send a username and password

This is the most common reason people look for IP authentication. If the machine has a fixed public IP, the simplest fix is to add it to the proxy's IP whitelist and give the tool only IP:PORT. If its IP changes, these workarounds keep credentials:

Browsers and OS settings

Chrome's --proxy-server flag and many operating-system proxy settings take a host and port but no login. Browsers usually prompt for HTTP proxy credentials when the proxy returns 407, and an extension can supply them automatically; see the Chrome proxy setup for the options. Built-in SOCKS settings in browsers generally have no login fields, so use HTTP mode there.

A local forwarder

For software that truly cannot authenticate, run a small proxy on the same machine that accepts unauthenticated connections from localhost and forwards them to the upstream proxy with the username and password added. Squid can do this with a cache_peer line using its login= option, and other lightweight proxies offer similar upstream-auth settings. Bind the forwarder to 127.0.0.1 only, or you will have created an open proxy.

Formatting username and password lines for your tools

Providers deliver credentials in different layouts, and tools expect different ones. The common forms are ip:port:user:pass, user:pass@ip:port and a URL such as http://user:pass@ip:port or socks5h://user:pass@ip:port. Rather than editing a long list by hand, paste it into the proxy format converter and pick the layout your tool wants.

In code, split the line on the first three colons and URL-encode the username and password before building a proxy URL. A password containing @, : or # otherwise breaks parsing and shows up as a confusing 407 or connection error:

import os
from urllib.parse import quote

import requests

# The line as delivered: ip:port:user:pass (here read from an environment variable)
line = os.environ.get("PROXY_LINE", "203.0.113.10:8080:USER:PASS")
ip, port, user, password = line.split(":", 3)

# URL-encode the login so characters such as @ : / # in a password do not break the URL
proxy = f"http://{quote(user, safe='')}:{quote(password, safe='')}@{ip}:{port}"

r = requests.get(
    "https://proxyv4.com/api/my-ip",
    proxies={"http": proxy, "https": proxy},
    timeout=10,
)
print(r.status_code, r.text.strip())

With curl, you can put the credentials in the proxy URL or pass them separately with --proxy-user, which keeps them out of the URL:

# Credentials inside the proxy URL
curl --max-time 15 -x http://USER:[email protected]:8080 https://proxyv4.com/api/my-ip

# Or keep them out of the URL with --proxy-user (-U)
curl --max-time 15 -x http://203.0.113.10:8080 -U USER:PASS https://proxyv4.com/api/my-ip

How ProxyV4 proxies handle login: both methods

Every ProxyV4 proxy is delivered as a single ip:port:user:pass line, so username and password works out of the box. It supports HTTP(S) and SOCKS5; on the order's page in the dashboard you choose HTTP only, SOCKS5 only, or both on the same port. Switching modes can move the proxy to a new port, so copy the line again afterwards.

IP whitelist login is available too: on the order's page in the dashboard, open IP Whitelist, add up to three public IPv4 addresses and save; connections from those addresses then need no username or password. Clear the list (Revert to user:pass) to go back to credential login. Use the whitelist for a server with a fixed public IP or a tool that has no login fields, and keep username and password for laptops, home Wi-Fi and cloud workers whose IP changes.

Private datacenter IPv4 is available in the United States, Vietnam, Japan, South Korea, Singapore, the United Kingdom and Hong Kong; static ISP proxies are fixed IPs registered to consumer internet providers in the United States and Vietnam. Each IP has one tenant for the term, traffic is unmetered, and renewing before expiry keeps the same address. Prices are per IP per month; see live prices and order a single IP to test your tools first. A proxy that fails for a technical reason, such as not connecting or showing the wrong location, is covered by the refund policy as a credit to your account balance.

Choosing the method for your setup

Choose an IP allow-list when your software runs on a server with a fixed public IP that only you control, and the software cannot send proxy credentials. It keeps secrets out of configuration entirely, at the cost of updating the list whenever that IP changes.

Choose username and password for everything else: laptops, home connections, teams in several places, cloud workers and containers. It is the more portable method, and with credentials kept in environment variables and a password unique to the proxy, the main risk is manageable. When you are unsure, start with credentials; they work from any network.

Frequently asked questions

Can I use IP authentication on a home connection?

You can, but if your ISP changes your public IP, the proxy stops accepting you until you update the allow-list. Username and password avoids that.

Which login method do ProxyV4 proxies use?

Both. Every proxy comes as an ip:port:user:pass line for username and password login, and on the order's page you can add up to three IPv4 addresses under IP Whitelist to connect from them without credentials. Clearing the list reverts to username and password.

Is username and password authentication slower?

Not noticeably. The check happens when a connection or tunnel opens, and kept-alive connections reuse it.

Is HTTP proxy Basic authentication secure?

It is not encrypted; base64 is only an encoding. Use a password unique to the proxy and send your traffic over HTTPS so page content stays protected.

Do the same credentials work for HTTP and SOCKS5?

On ProxyV4 proxies, yes. With both modes enabled on the same port, one ip:port:user:pass line serves HTTP and SOCKS5.

User/pass lines work from any network

Every ProxyV4 private IPv4 and static ISP proxy comes as one ip:port:user:pass line for HTTP(S) and SOCKS5, with unmetered traffic. Order one IP and test your tools.

See live prices

Related articles

Knowledge base
HTTP or SOCKS5: Picking the Proxy Protocol Your Software Needs
HTTP vs SOCKS5 proxy in plain terms: what each protocol carries, why HTTPS works through both, where UDP matters, and how to test which one a server speaks.
Proxy errors
Fixing a 407 from your proxy: a credentials checklist
407 Proxy Authentication Required means the proxy refused your login. The causes in one table, and fixes for Chrome, curl, Python, Selenium and antidetect apps.
Proxy setup
Python requests through an authenticated proxy, step by step
Send Python requests through an authenticated HTTP(S) proxy: build the proxies dict, attach it to a Session, encode odd passwords, rotate a list, check the IP.
Products
Dedicated datacenter proxies: one private IPv4 per customer
Private IPv4 proxies in the US, Vietnam, Japan, South Korea, Singapore, the UK and Hong Kong. One tenant per IP, HTTP(S) and SOCKS5, no traffic metering.
Products
Static ISP proxies: residential IPs on consumer networks
Static ISP proxies in the United States and Vietnam: fixed IPs registered to consumer internet providers, rented to one customer, with unmetered traffic.
Knowledge base
How Websites Detect Datacenter Proxies, and What It Means When You Buy
How websites detect datacenter proxies: ASN and registry data, published cloud ranges, reverse DNS, IP databases and behavior, and when a static ISP IP fits.
Knowledge base
Which Websites Support IPv6, and How to Check a Site Yourself
Which websites support IPv6? Many large platforms do, many sites still don't. Check any domain with dig, nslookup or curl -6 before you rely on IPv6.
Knowledge base
Using a Static IP for IP Whitelisting on APIs and Admin Panels
Get a static IP for IP whitelisting: route API, admin panel and tool traffic through one fixed outbound IPv4, verify the exit IP, and fix allow-list rejections.
Free tools
Check proxies in bulk: status, exit IP and latency
Free online proxy checker: paste up to 100 ip:port:user:pass lines and see which proxies work, their exit IP and latency, plus what each failure result means.
Pricing
Proxy prices per IP, by location and volume
Current per-IP rates for private IPv4 and static ISP proxies in the US, Vietnam, Japan, South Korea, Singapore, the UK and Hong Kong, with volume discounts.