Proxy in urllib3: ProxyManager
urllib3 has a quirk: ProxyManager doesn't take the login from the proxy URL. Here is how to pass it correctly.

Why use a proxy in urllib3
urllib3 is a low-level Python HTTP client; requests is built on it. ProxyManager handles HTTP proxies, SOCKSProxyManager from urllib3.contrib.socks handles SOCKS. Login and password for an HTTP proxy are passed as a header via make_headers(proxy_basic_auth=...).
For an HTTP proxy use ProxyManager with an auth header. If you need SOCKS5, install urllib3[socks] and use the socks5h scheme so DNS goes through the proxy. Rotation for data collection, a sticky session for sequential steps.
Residential
from $0.6 / GBHome ISP addresses. The main choice for accounts and protected sites.
VIP
$2 / GBHand-picked clean IPs, faster and more stable than regular residential.
Mobile
$4 / GBCarrier IPs, for platforms that check addresses strictly.
Step-by-step setup
Button names are given exactly as they appear in urllib3.
Install urllib3
Run pip install urllib3. For SOCKS5: pip install "urllib3[socks]".
Export the proxy
Take host, port, login and password in @SousProxyBot or the dashboard. Host and port go into the proxy URL, login and password into the header.
Build the header
Call urllib3.make_headers(proxy_basic_auth="LOGIN:PASSWORD") and pass the result to proxy_headers.
Create a ProxyManager
urllib3.ProxyManager("http://HOST:PORT", proxy_headers=headers). All requests through this object go via the proxy.
Check the IP
Run python ip.py. The response is JSON with the proxy address.
Code example
Put in your own HOST, PORT, LOGIN and PASSWORD from the bot or the dashboard.
import urllib3
headers = urllib3.make_headers(proxy_basic_auth="LOGIN:PASSWORD")
http = urllib3.ProxyManager("http://HOST:PORT", proxy_headers=headers)
r = http.request("GET", "https://api.ipify.org?format=json", timeout=15.0)
print(r.json())
Tested by running it
We ran this example ourselves: Python 3.13.18 · urllib3 2.8.0. Real output below, IP hidden.
$ python ip.py {'ip': 'proxy IP'}
And this is the response when the password is wrong:
$ python ip.py
…
File "/home/user/proxy-test/.venv/lib/python3.13/site-packages/urllib3/util/retry.py", line 555, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.ipify.org', port=443): Max retries exceeded with url: /?format=json (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))Check that it works
Open these pages through urllib3 with the proxy on.
Common errors
The issues people most often bring to support.
407 Proxy Authentication Required though the login is in the URLProxyManager doesn't take login and password from proxy_url. Pass them via make_headers(proxy_basic_auth="LOGIN:PASSWORD") in proxy_headers.
ProxySchemeUnknown with socks5://ProxyManager works only with http and https. For SOCKS use SOCKSProxyManager from urllib3.contrib.socks.
ImportError in urllib3.contrib.socksPySocks isn't installed. Run pip install "urllib3[socks]".
Site detects your region via DNSWith socks5 names resolve on your side. Use socks5h so DNS goes through the proxy. Check on /en/tools/dns-leak-test/.
FAQ
How do I connect SOCKS5?
from urllib3.contrib.socks import SOCKSProxyManager; http = SOCKSProxyManager("socks5h://LOGIN:PASSWORD@HOST:PORT"). Here login and password are taken right from the URL.
Why not just use requests?
requests is handier, but it's the same urllib3 underneath. If you're already on urllib3, you don't need the extra dependency.
How do I change the IP between requests?
Choose rotation when exporting the proxy. No code changes needed.
