Set up a LiFuProxy connection
Configure HTTP and SOCKS5, choose a location and a session mode, and connect with curl, Python or Node.js.
Connect from your dashboard
After buying traffic, open My Proxies → Get Proxies. Copy the connection URL or the host, port, username and password fields. Location and session settings may be part of the username or saved profile. Keep the values generated for your account.
Rotation and sticky sessions
Rotating mode selects an exit for each new connection. Sticky mode reuses an exit for the session while it remains available. Direct multi-country mode gives you a separate URL per location. Single-URL multi-country profiles use the relay. To verify one city, use a direct URL with a single location.
URL format
HTTP: http://USER:PASSWORD@HOST:PORT. SOCKS5 with remote DNS in supported clients: socks5h://USER:PASSWORD@HOST:PORT. If constructing a URL by hand, percent-encode reserved characters in credentials. Keep working credentials out of Git and logs.
If the connection fails
Check the protocol and remaining traffic. HTTP 407 generally indicates an authentication issue. If failures are limited to a single city, repeat the test with country-level targeting. When contacting support, send the time, location, protocol and error text without your password.
curl
curl --proxy 'http://HOST:PORT' --proxy-user 'USER:PASSWORD' https://example.com/Python / requests
import os
import requests
proxy = os.environ["LIFU_PROXY_URL"]
with requests.Session() as session:
session.trust_env = False
response = session.get(
"https://example.com/",
proxies={"http": proxy, "https": proxy},
timeout=(5, 20),
)
response.raise_for_status()
print(response.status_code)Node.js / Undici
import { fetch, ProxyAgent } from "undici";
const dispatcher = new ProxyAgent(process.env.LIFU_PROXY_URL);
try {
const response = await fetch("https://example.com/", {
dispatcher,
signal: AbortSignal.timeout(20000),
});
if (!response.ok) throw new Error("HTTP " + response.status);
console.log(response.status);
await response.body?.cancel();
} finally {
await dispatcher.close();
}Protocols and modes
SOCKS5 proxies
SOCKS5 works at the connection level. In curl, use a socks5h URL if DNS should be resolved through the proxy. Copy the host, port, username and password from your dashboard.
HTTP and HTTPS proxies
HTTP proxies work with curl and common HTTP clients. For an HTTPS destination, the client opens a CONNECT tunnel and verifies the destination certificate as it would on a direct connection.
Rotating proxies
Rotation is suited to independent observations from one location. A new connection can get a different exit IP. If your client reuses a TCP connection, several HTTP requests may use the same IP.
Sticky-session proxies
A sticky session helps a sequence of related steps use one exit IP. Reuse one generated URL and keep the flow within the configured duration.