You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [python-proxy-headers](https://github.com/proxymesh/python-proxy-headers) library enables sending custom headers to proxy servers and receiving proxy response headers. This is essential for services like [ProxyMesh](https://proxymesh.com) that use custom headers for country selection and IP assignment.
13
+
14
+
**Installation:**
15
+
16
+
```bash
17
+
pip install python-proxy-headers
18
+
```
19
+
20
+
**Examples:**
21
+
22
+
| Library | Example | Description |
23
+
|---------|---------|-------------|
24
+
|[requests](https://docs.python-requests.org/)|[requests-proxy-headers.py](python/requests-proxy-headers.py)| Simple HTTP requests with proxy headers |
25
+
| requests |[requests-proxy-headers-session.py](python/requests-proxy-headers-session.py)| Session-based requests for connection pooling |
26
+
|[urllib3](https://urllib3.readthedocs.io/)|[urllib3-proxy-headers.py](python/urllib3-proxy-headers.py)| Low-level HTTP client with proxy headers |
27
+
|[aiohttp](https://docs.aiohttp.org/)|[aiohttp-proxy-headers.py](python/aiohttp-proxy-headers.py)| Async HTTP client with proxy headers |
28
+
|[httpx](https://www.python-httpx.org/)|[httpx-proxy-headers.py](python/httpx-proxy-headers.py)| Modern HTTP client with proxy headers |
29
+
| httpx |[httpx-async-proxy-headers.py](python/httpx-async-proxy-headers.py)| Async httpx with proxy headers |
30
+
|[pycurl](http://pycurl.io/)|[pycurl-proxy-headers.py](python/pycurl-proxy-headers.py)| libcurl bindings with proxy headers |
|[cloudscraper](https://github.com/venomous/cloudscraper)|[cloudscraper-proxy-headers.py](python/cloudscraper-proxy-headers.py)| Cloudflare bypass with proxy headers |
33
+
|[autoscraper](https://github.com/alirezamika/autoscraper)|[autoscraper-proxy-headers.py](python/autoscraper-proxy-headers.py)| Automatic web scraping with proxy headers |
34
+
35
+
### Basic Proxy Examples
36
+
37
+
*[requests-proxy.py](python/requests-proxy.py) - Basic proxy usage with requests
38
+
*[requests-random-proxy.py](python/requests-random-proxy.py) - Random proxy rotation
39
+
40
+
### Scrapy
41
+
42
+
*[scrapy-proxy-headers.py](python/scrapy-proxy-headers.py) - Scrapy spider with proxy headers
18
43
19
44
## Ruby Proxy Examples
20
45
21
-
*[requests_proxy](https://github.com/proxymesh/proxy-examples/blob/main/ruby/requests_proxy.rb) from [rpolley](https://github.com/rpolley)
46
+
*[requests_proxy.rb](ruby/requests_proxy.rb) - Ruby HTTP with proxy, from [rpolley](https://github.com/rpolley)
47
+
48
+
## Documentation
49
+
50
+
For more information on using proxy headers with Python:
51
+
52
+
*[python-proxy-headers on PyPI](https://pypi.org/project/python-proxy-headers/)
0 commit comments