
Proxy Authentication Methods Explained: Username/Password vs IP Whitelisting
Proxy authentication controls who can use a proxy. Username/password authentication checks credentials supplied by the client. IP whitelisting, also called an IP allowlist, checks the public source IP reaching the proxy. Credentials are convenient when your network changes; an allowlist can suit stable egress IPs or clients without password support. Choose a method your specific proxy product and client support.
Key takeaways
- Username/password authentication checks a credential pair. The client must support the proxy's protocol and authentication scheme.
- IP whitelisting checks the public source IP of the connection to the proxy. Several devices behind NAT may share that IP.
- An HTTP 407 response is a proxy-authentication challenge. SOCKS5 uses a different handshake and does not use these HTTP headers.
- A website's HTTPS URL does not, by itself, encrypt proxy credentials. TLS to the proxy and TLS to the website are separate connections.
- Authentication support varies by product. ProxyWing Standard and Premium residential proxies use username/password authentication without IP whitelist support; other product options are covered below.
Username/password vs IP whitelisting
| Question | Username and password | IP whitelist |
|---|---|---|
| What is checked? | The credentials supplied by the client | The public source IP reaching the proxy |
| What if the source IP changes? | May continue to work if provider rules permit | Update the allowed address or use an already supported alternative |
| What must the client support? | The proxy protocol and required authentication scheme | The proxy protocol; a password field may be unnecessary |
| How does team access work? | Separate users or credentials may be available, depending on the product | Users sharing a NAT egress may appear under the same source IP |
| What must you manage? | Secret storage, access and credential revocation | Ownership of allowed egress addresses and removal of stale entries |
| Does this encrypt traffic? | No; the connection's transport determines protection | No; removing the need to send a password does not encrypt traffic |
Choose credentials for a changing network or a client that already supports them. Choose an allowlist when you control a stable public egress address and the selected product supports IP authorization. A shared office or carrier-grade NAT address needs extra care because the IP does not identify one person.
Proxy exit rotation is a separate feature. Rotating the exit seen by a website does not automatically change the source IP that the proxy uses for an allowlist check.
What is proxy authentication?
Proxy authentication is an access check performed by a proxy before it accepts a client's use of the service. Commercial proxies commonly use a username/password pair or a source-IP allowlist. Corporate proxies can use other schemes. Authentication controls access; a dedicated exit IP and its allocation policy are separate product properties.

How HTTP proxy authentication works
- The client contacts the proxy.
- If authentication is required and acceptable credentials have not been supplied, the proxy returns 407 Proxy Authentication Required with a Proxy-Authenticate challenge.
- The client can retry using Proxy-Authorization in the form required by that challenge.
- The proxy applies its authentication and access rules before forwarding the request or establishing a CONNECT tunnel.
For example, a Basic challenge can contain this response header:
Proxy-Authenticate: Basic realm="proxy"
Some clients send configured credentials preemptively, so a visible 407 round trip is not required for every successful connection. IP-authorized connections may not need a credential challenge. Rejection behavior also depends on the protocol and gateway.
Proxy authentication vs website authentication
Proxy-Authenticate is the proxy's challenge; Proxy-Authorization is the client's credential header for the proxy. A website's authentication normally uses WWW-Authenticate and Authorization, often with a 401 response. Set proxy credentials through the client's proxy configuration rather than adding them as a general header intended for the website.
How the two authentication methods work
Username and password
The provider supplies proxy credentials, which may differ from your website-account login. Enter them in the client's proxy authentication fields or use a supported proxy URL format. HTTP Basic encodes a username/password pair; SOCKS5 exchanges credentials during its own authentication handshake.
Credentials can be useful for a laptop, remote worker or short-lived environment whose source IP changes. This still depends on provider restrictions and client compatibility. Separate users, quotas and session parameters are product features, so check their availability rather than assuming that every credential pair provides individual team controls.
The main responsibility is protecting the secret. Store it outside source code, restrict who can retrieve it and revoke it when access should end. When credentials are embedded in a URL, reserved characters must be encoded correctly.
IP whitelisting
The proxy checks whether the connection arrives from an allowed public source IP. You add the address used to reach the proxy, not the proxy server's own address or its exit IP. A private LAN address such as 192.168.1.10 is generally not the address a remote commercial proxy sees.
A router, cloud NAT gateway or VPN can determine the source IP the proxy observes. Two devices behind the same NAT may share it; changing devices alone does not necessarily change it. Switching networks or enabling a VPN may change the route and require an allowlist update.
An allowlist can simplify access from a stable server or a client without proxy-password support. It grants access based on a network address rather than identifying an individual user. Confirm address-family support, entry limits and the behavior when your egress IP changes.
HTTP schemes, SOCKS5 and transport security
Basic authentication
HTTP Basic uses a Base64 representation of the username/password pair. Base64 is reversible encoding, not encryption. Use a transport that protects credentials on the client-to-proxy connection when the endpoint and client support it.
Website HTTPS is different from an HTTPS proxy
With an ordinary HTTP proxy, a client can send a CONNECT request and proxy credentials before establishing TLS with the destination website. The later website HTTPS connection protects website traffic, but it does not retroactively protect those proxy credentials.
An HTTPS proxy can instead mean that the client establishes TLS with the proxy itself. That protects the client-to-proxy exchange, including proxy authentication. HTTPS traffic to the website then has its own TLS connection through the tunnel, assuming normal certificate verification and no TLS interception. Confirm what the provider means by HTTPS support; support for HTTPS websites alone does not prove a TLS-enabled proxy endpoint.

Other schemes
Digest, NTLM and Negotiate appear in some proxy environments. Their availability depends on the proxy, client, platform and authentication configuration. Digest is not limited to MD5, and no scheme name alone guarantees a secure setup.
An API Bearer key used to manage a proxy account is also different from credentials used to carry traffic through a proxy. For example, ProxyWing's management API uses an Authorization Bearer token; that does not make the API key a replacement for your proxy login.
SOCKS5 negotiates authentication during its handshake rather than using Proxy-Authenticate or Proxy-Authorization. Its username/password subnegotiation does not provide encryption by itself.
How to configure proxy authentication
Obtain the proxy scheme, host, port and supported authentication method from the selected product. For the examples below, set PROXY_URL to the proxy origin, such as http://proxy.example:8080, without credentials, a path or a query. The example domain is a documentation placeholder; use your issued endpoint. Set PROXY_USER to the proxy username. Python and Node.js also read PROXY_PASS from the environment.
Use a secret manager or your deployment platform to provide secrets without committing them to code. Environment variables can still be exposed by logs or process inspection, so limit access. The proxy URL scheme describes the connection to the proxy, independently of the HTTPS target.
cURL
In a POSIX shell:
curl --proxy "$PROXY_URL" --proxy-user "$PROXY_USER" --connect-timeout 10 --max-time 30 https://httpbin.org/ip
In Windows PowerShell:
curl.exe --proxy "$env:PROXY_URL" --proxy-user "$env:PROXY_USER" --connect-timeout 10 --max-time 30 https://httpbin.org/ip
With a username and no colon/password in –proxy-user, cURL prompts for the proxy password. This avoids putting the password directly into this command. The examples use the proxy's Basic authentication support; use the scheme required by your provider. The IP-check response shows the exit seen by that service and is not a complete test of every app's routing.
Python Requests
Install Requests in your application environment. Supply the three environment values described above; PROXY_PASS contains the raw password, not a pre-encoded value. This example encodes the username and password once when constructing the proxy URL:
import os
from urllib.parse import quote, urlsplit, urlunsplit
import requests
endpoint = urlsplit(os.environ["PROXY_URL"])
if endpoint.scheme not in ("http", "https") or not endpoint.hostname:
raise ValueError("PROXY_URL must be an HTTP or HTTPS proxy origin")
if endpoint.username is not None or endpoint.path not in ("", "/"):
raise ValueError("Keep credentials and paths out of PROXY_URL")
user = quote(os.environ["PROXY_USER"], safe="")
password = quote(os.environ["PROXY_PASS"], safe="")
proxy_url = urlunsplit((
endpoint.scheme, f"{user}:{password}@{endpoint.netloc}", "", "", ""
))
proxies = {"http": proxy_url, "https": proxy_url}
response = requests.get(
"https://httpbin.org/ip", proxies=proxies, timeout=(10, 30)
)
response.raise_for_status()
print(response.json())
The http and https dictionary keys describe target URLs. Both can use the same HTTP proxy endpoint. Leave certificate verification enabled. For SOCKS proxies, Requests needs its optional SOCKS dependencies and the matching URL scheme; this example configures HTTP or HTTPS proxies.
Node.js fetch with Undici
Install an Undici release compatible with your Node.js version using npm install undici. Save the example in an .mjs file. Set PROXY_URL, PROXY_USER and PROXY_PASS as described above:
import { fetch, ProxyAgent } from "undici";
const { PROXY_URL, PROXY_USER, PROXY_PASS } = process.env;
if (!PROXY_URL || !PROXY_USER || !PROXY_PASS) {
throw new Error("Set PROXY_URL, PROXY_USER and PROXY_PASS");
}
const token = Buffer.from(`${PROXY_USER}:${PROXY_PASS}`).toString("base64");
const dispatcher = new ProxyAgent({
uri: PROXY_URL,
token: `Basic ${token}`,
});
try {
const response = await fetch("https://httpbin.org/ip", {
dispatcher,
signal: AbortSignal.timeout(30000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
} finally {
await dispatcher.close();
}
Importing both fetch and ProxyAgent from Undici keeps the dispatcher and client in the same package. This is an HTTP Basic example, not a configuration for every authentication scheme. Do not put Proxy-Authorization into the destination request's general headers. See the ProxyAgent documentation for supported options.
Postman
- Open Settings > Settings > Proxy. Under Proxy configurations for sending requests, enable Use custom proxy configuration.
- Select the request types in Use proxy for. In Proxy server, choose the supported protocol and enter the issued host and port separately, without a protocol prefix in the host field.
- For the Basic-authentication setup, enable Proxy auth and enter the proxy Username and Password. These are separate from the request's API Authorization tab.

- Review Proxy bypass, then send a request to https://httpbin.org/ip. Hosts in the bypass list will not use this custom proxy. The address in the documentation screenshot is illustrative; use your issued endpoint.
Custom proxy settings concern request routing; they do not configure every Postman online service. Consult the current Postman proxy guide if the interface differs. For an IP-authorized setup, use the product's supported route without adding unnecessary credentials.
Choose a ProxyWing product with the required authentication
For a static exit and a choice of credentials or IP authorization, choose ProxyWing datacenter proxies. If you need an ISP product with IP whitelist support, review ProxyWing ISP proxies and check that the chosen location uses the ISP NEW architecture; ISP OLD does not offer that feature.
For residential exit selection or rotation, choose ProxyWing residential proxies. The documented Standard and Premium products use username/password authentication and do not support IP whitelist. Do not purchase them on the assumption that you can switch to IP authorization afterward.
Add a datacenter allowlist entry
- Determine the public source IPv4 address of the machine and route that will connect to the proxy, with the tested proxy disabled. A cloud runner's egress can differ from your laptop's IP.
- In the datacenter dashboard, find IP Whitelist, enter that address in Enter IP address, and click +.
- Confirm that the address appears in the list and the IP counter increases. The address shown in the documentation image is an example, not an address to copy.

- Configure the issued proxy host and port in the client, without credentials for the allowlisted route, and check the result. Remove an obsolete entry using its x button.
The documented datacenter workflow adds external IPv4 addresses. Username/password access continues to work alongside the allowlist, so the presence of both methods does not mean both are required on each connection. See the datacenter IP whitelist instructions for the current workflow.
Fix common proxy authentication errors
HTTP 407 Proxy Authentication Required
Check which proxy returned the response and inspect its Proxy-Authenticate challenge. Confirm the correct proxy endpoint, authentication scheme, issued credentials and product status. For a CONNECT request to an HTTPS website, a client may report the 407 as a tunnel or proxy exception rather than an ordinary website response.
Do not send the proxy password as the target website's Authorization header. If the client cannot handle the required proxy authentication scheme, changing the password alone will not fix it.
Timeout or connection refused
A timeout can involve DNS, routing, firewall rules, an unavailable service or an incorrect endpoint. Connection refusal means a connection was rejected, not proof of an authentication failure. Check reachability and the correct protocol/port separately from credentials. SOCKS5 failures follow the SOCKS handshake rather than an HTTP 407 exchange.
Source IP is not allowed
Check the public source address from the actual workload host and route with the tested proxy disabled. A VPN, cloud NAT or network change can affect it. Add the correct address only if the product supports that address family and you control the egress. Do not allowlist the proxy's exit IP.
Special characters in credentials
When a client accepts separate username and password fields, supply the original values. If you embed them in a URL, percent-encode the username and password components once. Do not encode the whole URL or re-encode an already encoded password. URL encoding and Basic's Base64 encoding solve different problems.
Repeated browser prompts or one client works while another fails
Check the active proxy profile, issued credentials and supported scheme. Compare the endpoint, protocol, bypass rules and source network with the working client. Clear saved proxy credentials if they are stale; deleting website cookies or the general browser cache does not necessarily reset proxy authentication. Managed browser or network policy may require an administrator's help. Redact secrets before sharing diagnostics.
Protect credentials and review access
Keep proxy secrets outside source code and version control. Use a secret manager or access-controlled deployment configuration, and avoid printing proxy URLs, authentication headers or passwords in logs. Environment variables are a delivery mechanism, not protection against every local user or diagnostic tool.
Revoke or replace credentials after suspected exposure, when a user should lose access, or according to the product's security policy. Review allowed source IPs when servers, networks or responsibilities change, and remove entries you no longer control.
Protect the client-to-proxy transport where supported and keep TLS certificate checks enabled. A secure website URL, Base64 encoding or successful authentication does not establish that the proxy connection itself is encrypted.
If both password and IP-based access are available, verify whether the gateway accepts either method or actually requires both. Alternative access methods are not automatically multi-factor authentication. Choose the narrowest supported access rule that fits the workload and test it from the intended client.
Article written by:
Full Stack AI Engineer
Full-stack engineer at Proxywing working across backend architecture, performance optimization, and AI-driven workflows. Node.js, React, cloud infrastructure, and RAG pipelines.
All articles by author (63)FAQ
An HTTP proxy returns 407 when it requires acceptable proxy authentication. Missing or rejected credentials, an unsupported scheme or a client that does not send the needed proxy authentication can cause it. Inspect Proxy-Authenticate and verify the issued endpoint, method and credentials. A SOCKS5 rejection uses its own handshake rather than HTTP 407.
Proxy-Authenticate comes from the server and it specifies the required authentication scheme. Proxy-Authorization comes from the client and it contains the actual credentials. So, the key difference is that one starts from the server-side while the other starts from the client side.
The client may be using stale credentials, the wrong proxy profile or an authentication scheme it cannot complete. Check the endpoint, protocol and saved proxy login, then compare with a working client. Managed policies can also affect authentication. Clearing website cookies or the general cache is not a reliable reset for saved proxy credentials.
Distinguish a TLS connection to the proxy from an HTTPS connection to the website. With an HTTPS proxy endpoint, TLS protects the exchange with the proxy. With an ordinary HTTP proxy, CONNECT authentication may be sent before website TLS starts. CONNECT alone does not encrypt the proxy credentials. Confirm endpoint and client support, and keep certificate verification enabled.
Compare the exact proxy endpoint, protocol, authentication scheme, credential encoding, bypass rules and source route. Different clients have different proxy support and configuration APIs. In Node.js, an Undici ProxyAgent is passed as dispatcher; an agent option copied from another library is not equivalent. Inspect errors and redact credentials before sharing logs.
Authentication support depends on the operator and proxy configuration, not simply on whether access is free or paid. A service without password authentication may still restrict access by source IP. For managed access, choose the matching ProxyWing product and verify its supported method, client compatibility and transport protection.
HTTP proxy authentication can use Proxy-Authenticate and Proxy-Authorization. SOCKS5 negotiates an authentication method during its own handshake, with username/password exchange if that method is selected. Use a client that supports the selected protocol and method. A URL containing credentials is only a configuration format; it does not add encryption.
Whitelist the public source IP that the proxy sees from your workload host and network route, subject to the product’s supported address family. This may be a router, cloud NAT or VPN egress address. Do not add a private LAN address or the proxy’s exit IP. Devices behind the same NAT may share one public source address.


