Skip to content
Production Routing

Proxy Setup & Configuration

Configure every proxy type for your workload. This guide covers residential (rotating & sticky), ISP (static), mobile (4G/5G), and datacenter proxies with geo-targeting parameters and code examples.

Proxy Types Overview

Residential

Real ISP IPs, high success rate, rotating or sticky sessions

ISP Proxies

Static residential IPs, blazing fast, datacenter speed + residential trust

Mobile

Real 4G/5G IPs from mobile carriers, very hard to detect

Datacenter

Highest speed, pay per GB, ideal for non-sensitive targets

Residential Proxy Setup

Rotating Sessions

Each request gets a new IP. Best for scraping, data collection, and ad verification.

bash
# Rotating residential - new IP per request
curl -x "http://USERNAME:PASSWORD_country-us@basic.resi.zentislabs.com:12321" \
"https://httpbin.org/ip"
# Run 5 requests - each gets a different IP
for i in $(seq 1 5); do
curl -s -x "http://USERNAME:PASSWORD_country-us@basic.resi.zentislabs.com:12321" \
"https://httpbin.org/ip"
done

Sticky Sessions

Maintain the same IP across multiple requests. Best for checkout flows, account actions, and multi-step scraping. In production, use the sticky lines generated in the dashboard or API: they point at a single gateway IP so your session keeps its exit IP.

python
import requests
# Sticky session (Basic) - same IP for 10 minutes (_lifetime-10m)
proxy_url = "http://USERNAME:PASSWORD_country-de_session-checkout42_lifetime-10m@basic.resi.zentislabs.com:12321"
proxies = {
"http": proxy_url,
"https": proxy_url,
}
# All requests in this session use the same IP
session = requests.Session()
session.proxies = proxies
# Step 1: Visit product page
r1 = session.get("https://example.com/product/123")
# Step 2: Add to cart (same IP)
r2 = session.post("https://example.com/cart/add", json={"product_id": 123})
# Step 3: Checkout (same IP)
r3 = session.post("https://example.com/checkout")
print("All requests used the same IP for session consistency")

ISP Proxy Setup (Static Residential)

ISP proxies provide static residential IPs that never rotate. They combine datacenter speed with residential trust scores.

bash
# ISP proxy - static IP, does not rotate
# Copy a line from Dashboard → ISP Proxies: IP:PORT:USERNAME:PASSWORD
curl -x "http://USERNAME:PASSWORD@IP:PORT" \
"https://httpbin.org/ip"
# This IP stays assigned to your account until released
typescript
import axios from "axios";
import { HttpsProxyAgent } from "https-proxy-agent";
// ISP proxy - static dedicated IP (line from Dashboard → ISP Proxies)
const agent = new HttpsProxyAgent(
"http://USERNAME:PASSWORD@IP:PORT"
);
// All requests use the exact same IP
const results = await Promise.all([
axios.get("https://httpbin.org/ip", { httpsAgent: agent }),
axios.get("https://httpbin.org/ip", { httpsAgent: agent }),
axios.get("https://httpbin.org/ip", { httpsAgent: agent }),
]);
// All three will show the same origin IP
results.forEach((r, i) => console.log(`Request ${i + 1}: ${r.data.origin}`));

Best Use Cases for ISP Proxies

  • Social media account management (consistent IP per account)
  • SEO monitoring from fixed locations
  • e-commerce/Automation Tools requiring session persistence
  • Market research with consistent identity

Mobile Proxy Setup (4G/5G)

Mobile proxies use real 4G/5G connections from mobile carriers. They share IPs with thousands of real mobile users, making them very hard to detect.

bash
# Mobile proxy - real 4G/5G IP
# Generate in Dashboard → Mobile (country, city, Rotating or Sticky), then copy a line:
# mobile.zentislabs.com:PORT:USERNAME:PASSWORD
curl -x "http://USERNAME:PASSWORD@mobile.zentislabs.com:PORT" \
"https://httpbin.org/ip"
# Mobile sticky session - use a line generated with "Sticky"
curl -x "http://USERNAME:PASSWORD@mobile.zentislabs.com:PORT" \
"https://httpbin.org/ip"
python
import requests
# Mobile proxy - location is chosen when you generate the line
proxy = "http://USERNAME:PASSWORD@mobile.zentislabs.com:PORT"
proxies = {"http": proxy, "https": proxy}
response = requests.get("https://httpbin.org/ip", proxies=proxies)
print("Mobile IP:", response.json()["origin"])
# With a rotating line, each request gets a new mobile IP
for i in range(3):
r = requests.get("https://httpbin.org/ip", proxies=proxies)
print(f"Mobile IP {i+1}: {r.json()['origin']}")

Datacenter Proxy Setup

Our fastest option, priced per GB. Best for targets without aggressive anti-bot measures.

bash
# Datacenter proxy - highest speed, pay per GB
# Generate in Dashboard → Datacenter (country, Rotating or Sticky), then copy a line:
# dc.zentislabs.com:PORT:USERNAME:PASSWORD
curl -x "http://USERNAME:PASSWORD@dc.zentislabs.com:PORT" \
"https://httpbin.org/ip"
# Or generate datacenter lines via the API
curl -X POST "https://api.zentislabs.com/api/v1/proxies/generate" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"provider": "datacenter", "country": "us", "sessionType": "rotating", "count": 10}'
typescript
import axios from "axios";
import { HttpsProxyAgent } from "https-proxy-agent";
// High-throughput scraping spread across your generated lines
// (each host:port:username:password line written as a proxy URL)
const proxyUrls = [
"http://USERNAME:PASSWORD@dc.zentislabs.com:PORT",
// ...one entry per generated line
];
const agents = proxyUrls.map((u) => new HttpsProxyAgent(u));
// Parallel requests across the lines
const urls = Array.from({ length: 50 }, (_, i) => `https://example.com/page/${i}`);
const results = await Promise.allSettled(
urls.map((url, i) =>
axios.get(url, {
httpsAgent: agents[i % agents.length],
timeout: 15000,
})
)
);
const success = results.filter((r) => r.status === "fulfilled").length;
console.log(`Success: ${success}/${urls.length}`);

Geo-Targeting Parameters

Target residential proxies by country, state, or city for precise geographic accuracy. On Light and Basic these parameters are appended to the password with underscores. Advanced takes country and session only, on the username with hyphens: USERNAME-country-us-session-abc123-sessionduration-30.

ParameterFormatExampleDescription
countryISO 3166-1, lowercase_country-usCountry targeting
stateName, lowercase, no spaces_state-texasState/region (Light, Basic)
cityName, after its state_state-texas-city-austinCity-level targeting (Light, Basic)
sessionLetters and digits_session-abc123Sticky session ID
lifetimeMinutes_lifetime-30mSession length (Basic)

Combined Targeting Examples

bash
# Country + State + City (the city follows its state)
curl -x "http://USERNAME:PASSWORD_country-gb_state-england-city-london@basic.resi.zentislabs.com:12321" \
"https://httpbin.org/ip"
# Country + sticky session (same IP for 30 minutes)
curl -x "http://USERNAME:PASSWORD_country-us_session-abc123_lifetime-30m@basic.resi.zentislabs.com:12321" \
"https://httpbin.org/ip"

Failover & Retry Configuration

Define deterministic retry logic in your client to avoid duplicate transactions and bot fingerprints. Pass the proxy URLs to try in order. See Error Handling for more client-side retry and failover patterns.

python
import time
import requests
def fetch_with_failover(url, proxy_urls, max_retries=3):
"""Fetch URL with automatic proxy failover."""
backoff = [0.2, 0.5, 1.5]
for attempt in range(max_retries):
index = min(attempt, len(proxy_urls) - 1)
proxy = proxy_urls[index]
try:
response = requests.get(
url,
proxies={"http": proxy, "https": proxy},
timeout=15,
)
if response.status_code in [429, 502, 503, 504]:
time.sleep(backoff[attempt])
continue
return response
except requests.exceptions.RequestException:
time.sleep(backoff[attempt])
continue
raise Exception(f"All {max_retries} attempts failed for {url}")

Compliance Note

Ensure your use case aligns with local regulations and target platform terms of service. Add internal controls for consent, data retention, and audit logging where required. ZentisLabs is a neutral infrastructure provider.

Next: Code Examples

Copy-paste production-ready code snippets in Python, Node.js, and cURL.

Code Examples