wreq.proxy
Proxy settings for HTTP, HTTPS, and SOCKS proxies.
wreq.proxy
ProxyConfig
typed-dict
Bases: TypedDict
Source code in python/wreq/proxy.py
__init__
__init__(*, username=..., password=..., custom_http_auth=..., custom_http_headers=..., exclusion=...)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username for proxy authentication. |
...
|
password
|
str
|
Password for proxy authentication. |
...
|
custom_http_auth
|
str
|
Custom HTTP proxy authentication header value. |
...
|
custom_http_headers
|
Mapping[str, str] | HeaderMap
|
Custom HTTP proxy headers. |
...
|
exclusion
|
str
|
List of domains to exclude from proxying. |
...
|
Proxy
A proxy server for a request. Supports HTTP, HTTPS, SOCKS4, SOCKS4a, SOCKS5, and SOCKS5h protocols.
Source code in python/wreq/proxy.py
http
staticmethod
http(url, *, username=..., password=..., custom_http_auth=..., custom_http_headers=..., exclusion=...)
Creates a new HTTP proxy.
This method sets up a proxy server for HTTP requests.
Examples
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username for proxy authentication. |
...
|
password
|
str
|
Password for proxy authentication. |
...
|
custom_http_auth
|
str
|
Custom HTTP proxy authentication header value. |
...
|
custom_http_headers
|
Mapping[str, str] | HeaderMap
|
Custom HTTP proxy headers. |
...
|
exclusion
|
str
|
List of domains to exclude from proxying. |
...
|
Source code in python/wreq/proxy.py
https
staticmethod
https(url, *, username=..., password=..., custom_http_auth=..., custom_http_headers=..., exclusion=...)
Creates a new HTTPS proxy.
This method sets up a proxy server for HTTPS requests.
Examples
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username for proxy authentication. |
...
|
password
|
str
|
Password for proxy authentication. |
...
|
custom_http_auth
|
str
|
Custom HTTP proxy authentication header value. |
...
|
custom_http_headers
|
Mapping[str, str] | HeaderMap
|
Custom HTTP proxy headers. |
...
|
exclusion
|
str
|
List of domains to exclude from proxying. |
...
|
Source code in python/wreq/proxy.py
all
staticmethod
all(url, *, username=..., password=..., custom_http_auth=..., custom_http_headers=..., exclusion=...)
Creates a new proxy for all protocols.
This method sets up a proxy server for all types of requests (HTTP, HTTPS, etc.).
Examples
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username for proxy authentication. |
...
|
password
|
str
|
Password for proxy authentication. |
...
|
custom_http_auth
|
str
|
Custom HTTP proxy authentication header value. |
...
|
custom_http_headers
|
Mapping[str, str] | HeaderMap
|
Custom HTTP proxy headers. |
...
|
exclusion
|
str
|
List of domains to exclude from proxying. |
...
|
Source code in python/wreq/proxy.py
unix
staticmethod
unix(path, *, username=..., password=..., custom_http_auth=..., custom_http_headers=..., exclusion=...)
Creates a new UNIX socket proxy.
This method sets up a proxy server using a UNIX domain socket.
Examples
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username for proxy authentication. |
...
|
password
|
str
|
Password for proxy authentication. |
...
|
custom_http_auth
|
str
|
Custom HTTP proxy authentication header value. |
...
|
custom_http_headers
|
Mapping[str, str] | HeaderMap
|
Custom HTTP proxy headers. |
...
|
exclusion
|
str
|
List of domains to exclude from proxying. |
...
|