Basic proxy usage
Pass theproxy option to route requests through a proxy server:
Authenticated proxies
Include credentials in the proxy URL:SOCKS proxies
SOCKS5 proxies are also supported:Proxy rotation
Rotate through a list of proxies for each request:Session with proxy
Set a default proxy for all session requests:Override session proxy
Override the session’s default proxy for specific requests:Supported proxy types
| Protocol | URL Format | Notes |
|---|---|---|
| HTTP | http://host:port | Standard HTTP proxy |
| HTTPS | https://host:port | TLS-encrypted proxy connection |
| SOCKS5 | socks5://host:port | SOCKS5 proxy |
| SOCKS5h | socks5h://host:port | SOCKS5 with remote DNS resolution |