Proxy authentication: the username and password format, explained
Every Ludax proxy logs in with a username and a password, the standard way any HTTP or SOCKS5 proxy does. The username says which product you use; the password says which plan, and carries your options: a sticky IP, a country, a city. Here is the whole format, a generator, the setup for each tool and the fix for every 407.
- Username and passwordStandard proxy login, in any tool
- Options in the passwordSticky IP, country, region, city, ASN
- No IP allowlist neededWorks from any machine, any network
No plan yet? The smallest one is the test: 1 GB of Residential for $0.99, no subscription.
KEY FACTS
- A Ludax proxy URL is
http://USERNAME:[email protected]:7777: Basic proxy authentication, sent with every connection. - The username is
resi-orpremi-followed by your account name (lx_and 10 characters), the same for all your plans. On the TLS ports the browser profile follows:-AE-chrome154. - The password is the plan’s own 16-character password, then the options in this order:
-session-<token>-time-<minutes>, then-country-,-state-,-city-. - The port picks the product, and a plan’s password works only on its own product’s port.
- 407 means a wrong username or password, a prefix that does not match the port, or a plan with no data left. 30 failed logins in 5 minutes block the client IP for 10 minutes.
- Authentication is by username and password only: there is no IP allowlist to set up, and the credentials work from any machine.
Using an AI assistant? Give it this guide
One Markdown file with everything ChatGPT, Claude, Cursor or Copilot needs to write working Ludax code for proxy authentication: the connection format, the gateways in force, sessions, errors and tested examples. Copy it into the chat, or paste this prompt:
Read https://ludaxproxy.com/docs/proxy-authentication.md and set up the Ludax proxy login in my project.
The proxy username and password format
Two fields, each built from parts in a fixed order. The username names the product (and on the TLS ports the browser to look like); the password names the plan and carries the routing options.
ONE CONNECTION STRING, PART BY PART
http://resi-lx_k3m9q2p7xa:YOUR_PASSWORD-session-7f3ac1-time-30-country-de-state-by-city-munich@gw.ludaxproxy.com:7777
- username
- plan password
- session
- location
- gateway
| Part | Example | What it is |
|---|---|---|
| Product prefix | resi- / premi- | resi- for Residential and Residential TLS, premi- for Residential Premium and Premium TLS. |
| Account name | lx_k3m9q2p7xa | Yours, from the dashboard (Generate): lx_ and 10 characters, the same for every plan you buy. |
| Browser profile (TLS ports only) | -AE-chrome154 | The browser handshake the gateway sends, and AE or NAE for the headers. See TLS profiles. |
| Part | Example | What it is |
|---|---|---|
| Plan password | YOUR_PASSWORD | The plan’s own password: 16 hexadecimal characters. Each plan has its own; you can reset it in the dashboard. |
| Session (optional) | -session-7f3ac1-time-30 | The same IP for every connection that sends this token, for 30 minutes (up to 1000, Premium included). Without -time- a session lasts 1 minute. On the TLS ports add -sameip. |
| Location (optional) | -country-de-state-by-city-munich | A country, then a region, then a city, in lower case. Codes for every country are in the locations directory. |
| ASN (Premium, optional) | -asn-3320 | Residential Premium: exits inside one internet provider’s network. |
Ludax credentials contain only letters, digits, _ and -, so they never need escaping. If you ever put a value with @, : or / in a proxy URL, percent-encode it first (%40, %3A, %2F).
| You want | Username | Password |
|---|---|---|
| A new US IP on every connection | resi-lx_k3m9q2p7xa | YOUR_PASSWORD-country-us |
| One IP in Munich for 30 minutes | resi-lx_k3m9q2p7xa | YOUR_PASSWORD-session-7f3ac1-time-30-country-de-state-by-city-munich |
| Premium, inside one Japanese provider | premi-lx_k3m9q2p7xa | YOUR_PASSWORD-country-jp-asn-2516 |
| Chrome’s TLS fingerprint, one IP for 10 minutes | resi-lx_k3m9q2p7xa-AE-chrome154 | YOUR_PASSWORD-session-9c2e41-time-10-sameip-country-us |
Proxy credentials generator
Pick the product, the country and how the IP should behave, and copy the result in the form your tool wants: a URL, host:port:user:pass, a curl command or environment variables. Your username and password stay in this browser tab and are never sent anywhere.
YOUR CONNECTION STRING
http://resi-lx_k3m9q2p7xa:YOUR_PASSWORD-country-us@gw.ludaxproxy.com:7777
- username
- plan password
- session
- location
- gateway
The TLS ports need the Ludax CA once: download ludax-ca.crt and let your client trust it.
Proxy authentication in curl, Python, Node.js, Go, PHP, Java and C#
The same login in each language, tested against the gateway. Every one prints the whoami answer: the exit IP and its country.
# the whole login in the proxy URL
curl -x "http://resi-lx_k3m9q2p7xa:[email protected]:7777" \
https://api.ludaxproxy.com/whoami
# or the login on its own
curl -x "http://gw.ludaxproxy.com:7777" -U "resi-lx_k3m9q2p7xa:YOUR_PASSWORD-country-us" \
https://api.ludaxproxy.com/whoami# macOS and Linux (Windows PowerShell: $env:HTTPS_PROXY = "http://...")
export HTTP_PROXY="http://resi-lx_k3m9q2p7xa:[email protected]:7777"
export HTTPS_PROXY="$HTTP_PROXY"
# curl, Python requests, Go and many command-line tools now use the proxy on their own
curl https://api.ludaxproxy.com/whoamiimport requests # pip install requests
proxy = "http://resi-lx_k3m9q2p7xa:[email protected]:7777"
r = requests.get("https://api.ludaxproxy.com/whoami",
proxies={"http": proxy, "https": proxy}, timeout=30)
print(r.json())import { fetch, ProxyAgent } from "undici"; // npm install undici
const proxy = new ProxyAgent("http://resi-lx_k3m9q2p7xa:[email protected]:7777");
const res = await fetch("https://api.ludaxproxy.com/whoami", { dispatcher: proxy });
console.log(await res.json());package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
proxy, _ := url.Parse("http://resi-lx_k3m9q2p7xa:[email protected]:7777")
client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxy)}}
resp, err := client.Get("https://api.ludaxproxy.com/whoami")
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}<?php
$ch = curl_init("https://api.ludaxproxy.com/whoami");
curl_setopt_array($ch, [
CURLOPT_PROXY => "http://gw.ludaxproxy.com:7777",
CURLOPT_PROXYUSERPWD => "resi-lx_k3m9q2p7xa:YOUR_PASSWORD-country-us",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
echo curl_exec($ch);import java.net.*;
import java.net.http.*;
public class Request {
public static void main(String[] args) throws Exception {
// Java turns Basic proxy login off for HTTPS tunnels by default: turn it back on first
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
URI gateway = URI.create("http://gw.ludaxproxy.com:7777");
HttpClient client = HttpClient.newBuilder()
.proxy(ProxySelector.of(new InetSocketAddress(gateway.getHost(), gateway.getPort())))
.authenticator(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(
"resi-lx_k3m9q2p7xa", "YOUR_PASSWORD-country-us".toCharArray());
}
})
.build();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.ludaxproxy.com/whoami")).build();
System.out.println(client.send(request, HttpResponse.BodyHandlers.ofString()).body());
}
}using System.Net;
var handler = new HttpClientHandler
{
Proxy = new WebProxy("http://gw.ludaxproxy.com:7777")
{
Credentials = new NetworkCredential("resi-lx_k3m9q2p7xa", "YOUR_PASSWORD-country-us"),
},
};
using var client = new HttpClient(handler);
Console.WriteLine(await client.GetStringAsync("https://api.ludaxproxy.com/whoami"));{"ip": "203.0.113.24", "country": "United States", "type": "residential", "tls_profile": null, "latency_ms": 391}Java is the one that trips people up: since Java 8u111 the JDK will not send a Basic proxy login inside an HTTPS tunnel, so the request fails with a 407 until jdk.http.auth.tunneling.disabledSchemes is emptied, as above or with -Djdk.http.auth.tunneling.disabledSchemes= on the command line.
| Tool | How it logs in | Guide |
|---|---|---|
| Playwright | Pass username and password in the proxy option, in every language. | Playwright guide |
| Selenium | Chrome’s --proxy-server takes no password: Selenium answers the login through Chrome’s DevTools. | Selenium guide |
| Python requests, aiohttp, HTTPX | The login in the proxy URL. | Python guide |
| A browser by hand, an app, an OS setting | Set the host and port; the browser or app asks for the username and password when it first connects. | Host and port from the table on the Docs overview |
Official docs: curl: -x · requests: proxies · undici: ProxyAgent · Go: http.ProxyURL · PHP: curl_setopt · Java: HttpClient · .NET: WebProxy
Fix 407 Proxy Authentication Required
A 407 is the gateway saying it could not match your login to an active plan. Each cause below has a quick check. Never retry a 407 in a loop: it cannot fix itself, and repeated failures block your IP.
| Cause | How to tell | Fix |
|---|---|---|
| A typo, a space or a quote in the password | The password is not 16 hexadecimal characters before the first -. | Copy the credentials again from Generate in the dashboard. |
| The prefix does not match the port | premi- on gw.ludaxproxy.com:7777, or resi- on gw.ludaxproxy.com:8080. | Use each product’s own port: the table in the Docs overview. |
| Another plan’s password | You have several plans; each has its own password. | Use the password shown next to the plan you want. |
| Options in the username | -country- or -session- after the account name. | Move them to the password. Only the TLS profile goes in the username. |
| The plan is used up or expired | The dashboard shows the plan without data, or past its end date. | Add data to the plan, or buy a new one; the username stays the same. |
| Your client never sent the login | Chrome with --proxy-server, Java over HTTPS, or a tool that drops credentials from the URL. | Selenium: answer the login through DevTools. Java: the property above. Other tools: set the username and password in their own proxy fields. |
| The connection closes with no answer at all | 30 failed logins in 5 minutes block the client IP for 10 minutes. | Fix the credentials, then wait 10 minutes. Requests without any credentials (the normal first 407 challenge) do not count. |
Keep your proxy credentials safe
Because the login works from any machine, the password is what protects your data. Treat it like an API key.
- Keep it out of code. Read it from an environment variable or a secrets manager (
os.environ["LUDAX_PASSWORD"],process.env.LUDAX_PASSWORD), never commit it. - One plan per project. Each plan has its own password, so a leak stays inside one plan’s data.
- Reset a leaked password. Reset the plan’s password in the dashboard; the old one stops working, the username stays.
- No IP allowlist to manage. Ludax authenticates by username and password only, so the same credentials work on your laptop, a server or a CI runner.
Proxy authentication FAQ
Short answers to the questions behind most 407s.
01What is the Ludax proxy username and password?
The username is resi- or premi- followed by your account name (lx_ and 10 characters), the same for all your plans. The password is the plan’s own 16-character password. Both are in the dashboard under Generate.
02Where do the country and sticky session go?
In the password, after the plan password, in this order: -session-<token>-time-<minutes>, then -country-, -state- and -city-. For example YOUR_PASSWORD-session-7f3ac1-time-30-country-de. Only the TLS browser profile goes in the username.
03Can I authenticate by IP allowlist instead of a password?
No. Ludax authenticates by username and password only, so the same credentials work from any machine and network. Keep the password out of your code and reset it in the dashboard if it leaks.
04Why do I get 407 Proxy Authentication Required?
The gateway could not match the login to an active plan: a typo, a prefix that does not match the port (resi- on the Residential ports, premi- on the Premium ones), options in the username, or a plan with no data left. Do not retry a 407 in a loop: 30 failed logins in 5 minutes block your IP for 10 minutes.
05Does SOCKS5 use the same login?
Yes. Residential SOCKS5 (gw.ludaxproxy.com:7575) and Residential Premium SOCKS5 (gw.ludaxproxy.com:1080) take the same username and password, with the same options in the password.
06How do I use the proxy login in Chrome or Selenium?
Chrome’s --proxy-server flag has no place for a username and password. In Selenium, answer the proxy’s login through Chrome’s DevTools, as the Selenium guide shows for Python, Java, JavaScript, C# and Ruby. Playwright takes the username and password directly in its proxy option.
Your first authenticated request is two minutes away
- Pick a plan. The smallest one is the test: 1 GB, no subscription.
- Copy your username and password from Generate in the dashboard.
- Paste them into the generator above and run the curl command.
Still getting a 407? Send us the exact command and the answer on Telegram and we check it with you. Every plan and price: pricing.