# Datacenter Proxy (default - used with --proxy-type datacenter or no flag)DATACENTER_PROXY_USERNAME=your_usernameDATACENTER_PROXY_PASSWORD=your_passwordDATACENTER_PROXY_HOST=dc.yourproxy.comDATACENTER_PROXY_PORT=10000
Proxy Configuration:Check your proxy provider’s documentation for:
Correct hostname and port for datacenter vs residential proxies
Rotating vs sticky IP options
Authentication requirements
Since SmartProxyMiddleware uses a single proxy connection, use rotating IP ports when available for better IP distribution.
# Explicit auto mode./scrapai crawl spider_name --project proj --limit 10 --proxy-type auto
Auto mode flow:
1
Start with direct connections
✅ Fast, free connections - no proxy overhead
2
Detect block (403/429)
✅ Automatically retry with datacenter proxy (cheap, fast)
3
Datacenter fails
⚠️ Expert-in-the-loop prompt appears:
Copy
Ask AI
⚠️ EXPERT-IN-THE-LOOP: Datacenter proxy failed for some domains🏠 Residential proxy is available but may incur HIGHER COSTSBlocked domains: example.com, site.orgTo proceed with residential proxy, run: ./scrapai crawl spider_name --project proj --proxy-type residential
4
User decides
👤 You choose whether to use expensive residential proxies
Cost protection: Residential proxies require explicit user approval - no surprise costs!
Use whatever proxy service you prefer.Popular options include Bright Data, Oxylabs, IPRoyal, Smartproxy, and others. SmartProxyMiddleware works with any HTTP proxy provider.
Use with --proxy-type residential flag on crawl command. Same smart strategy (direct first, proxy only when blocked).Configure RESIDENTIAL_PROXY_* vars in .env with your provider’s residential proxy credentials.