Proxy in requests: HTTP and SOCKS5
In requests a proxy is a proxies dict per request or per session. Here are HTTP and SOCKS5 variants with a password.

Why use a proxy in Python requests
requests is a popular Python library for HTTP requests. The proxy is passed in the proxies parameter, separately for the http and https schemes. SOCKS needs the extra requests[socks] dependency.
Use HTTP by default; it works without extra packages. Add SOCKS5 if the task needs it, and use the socks5h scheme so DNS also goes through the proxy. Rotation for scraping, a sticky session for working with one account.
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 Python requests.
Install the library
For an HTTP proxy: pip install requests. For SOCKS5: pip install "requests[socks]".
Build the string
Export login:pass@ip:port in @SousProxyBot and add a scheme: http:// or socks5h://. Encode special characters in the password.
Fill in proxies
Use the same string for the "http" and "https" keys. The https key means the target site's scheme, not the proxy protocol.
Run it
Run the script: python ip.py. Set a timeout so a hung request doesn't block the program.
Check the IP
The script prints JSON with the IP. Compare it with /en/tools/my-ip/ without a proxy; the addresses must differ.
Code example
Put in your own HOST, PORT, LOGIN and PASSWORD from the bot or the dashboard.
import requests
proxy = "http://LOGIN:PASSWORD@HOST:PORT"
# SOCKS5: pip install "requests[socks]" and
# proxy = "socks5h://LOGIN:PASSWORD@HOST:PORT"
proxies = {"http": proxy, "https": proxy}
r = requests.get("https://api.ipify.org?format=json",
proxies=proxies, timeout=15)
print(r.json())
Tested by running it
We ran this example ourselves: Python 3.13.18 · requests 2.34.2. Real output below, IP hidden.
$ python ip.py {'ip': 'proxy IP'}
And this is the response when the password is wrong:
$ python ip.py
…
r = adapter.send(request, **kwargs)
File "/home/user/proxy-test/.venv/lib/python3.13/site-packages/requests/adapters.py", line 723, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: 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 Python requests with the proxy on.
Common errors
The issues people most often bring to support.
InvalidSchema: Missing dependencies for SOCKS supportThe SOCKS package isn't installed. Run pip install "requests[socks]".
ProxyError with code 407Wrong login or password, or a password with special characters isn't encoded. Encode it with urllib.parse.quote.
HTTPS sites bypass the proxyThe dict only has the "http" key. Add an "https" key with the same string.
Site detects your region via DNSThe socks5 scheme resolves names on your machine. Use socks5h so DNS goes through the proxy. Check on /en/tools/dns-leak-test/.
FAQ
What's the difference between socks5 and socks5h?
With socks5 the domain is resolved locally, with socks5h on the proxy side. For proxy work you almost always want socks5h.
How do I set a proxy for all requests at once?
Create requests.Session() and assign the same dict to session.proxies. requests also reads the HTTP_PROXY and HTTPS_PROXY variables.
Why the "https" key if the proxy is HTTP?
The key is the scheme of the address you're going to. For https sites requests opens a CONNECT tunnel through the HTTP proxy.
