Proxy Authentication: Username and Password vs IP Allowlists
· 5 min read
A proxy that anyone can use is not yours for long. Open proxies are found by scanners within hours, and once strangers are sending traffic through an address, its reputation goes with it. Authentication is what keeps an IP yours, and there are two ways to do it: prove who you are with a username and password, or prove where you are connecting from.
Username and password
The client sends a username and password with each connection. For HTTP proxies they travel in
the Proxy-Authorization header, for SOCKS5 in a short exchange right after the
connection opens. Most tools take them as part of the proxy address:
http://username:password@host:port Credentials have clear strengths:
- They work from anywhere. A laptop on hotel Wi-Fi, a home connection whose IP changes every week and a server in the cloud all use the same login.
- They identify the user. Give each person or tool a login of its own and you can tell them apart, and revoke one without touching the others.
- Every tool supports them, from browsers to game clients.
Their weakness is that they can leak. Neither HTTP nor SOCKS5 encrypts the credentials on the way to the proxy, they end up in config files, scripts and screenshots, and whoever finds them can use your IP from anywhere in the world.
IP allowlists
With an allowlist, the proxy accepts connections only from addresses you have listed, and no password is involved. If a server with a fixed IP is the only thing that should use the proxy, you list that IP and nothing else can connect.
- Nothing to leak. There is no secret to steal: someone who learns the proxy's address still can't use it from their own connection.
- Simpler configuration. Tools that handle proxy passwords badly, or not at all, just need the host and port.
The catch is that it only works when you connect from addresses that don't change. Home connections, mobile networks and laptops that move around make allowlists a chore, and an allowlisted address shared by many people, such as an office or a VPN exit, lets all of them in.
Which one to use
- Servers and scrapers on fixed IPs: an allowlist. It is the tighter of the two and there is nothing to rotate.
- People on laptops and home connections: credentials, one login per person.
- Anti-detect browsers shared by a team: credentials, so that each member can be given and later lose access on their own. More on that in proxies for anti-detect browsers.
Keeping credentials safe
- Give every person and every tool its own login. A shared login can't be revoked without breaking everyone who uses it.
- Keep credentials out of code. Use environment variables or a secrets manager.
- Change them when someone leaves, or when a config file ends up somewhere it shouldn't.
- Watch your usage. Traffic at hours when nothing of yours runs, or to destinations you don't recognise, is the clearest sign that someone else has your login. See proxy usage metrics for what to look for.
Denylists: the other side
An allowlist says who may connect. A denylist does the opposite, refusing connections from specific addresses or whole ranges. It is useful when credentials have to work from anywhere, but you know some networks should never be let in.
How it works at Leastslow
Credentials, allowlists and denylists are separate objects in the dashboard. You create them once and attach them to any number of packages, so changing a password or adding a server's IP takes effect everywhere it is used. Connections refused by these rules show up as blocked in your usage metrics, which makes a missing allowlist entry easy to spot. Pricing is on the homepage.