Skip to main content

cd_proxy_manager

cd_proxy_manager is a Python package designed to handle proxy configurations and management for various purposes such as setting environment proxies, formatting proxies, and dealing with proxies in HTTP requests and browsers.

Installation

To install cd_proxy_manager, clone the repository and install the required dependencies:

git clone <repository-url>
cd cd_proxy_manager
pip install -r requirements.txt

or

pip install cd-proxy-manager

Modules

__init__.py

This file initializes the package.

browser_judges.py

This module includes various browser judge urls.

format_proxy.py

This module provides functionality for formatting proxies in various formats, making them suitable for use with different libraries and tools.

http_judges.py

This module includes various HTTP judge urls.

proxy_dealer.py

This module is designed to manage and deal with multiple proxies, possibly including rotation and validation.

set_env_proxy.py

This module provides a function to set an environment variable for a proxy, supporting both simple and authenticated proxies.

set_global_proxy.py

This module includes functionality to set a global proxy configuration for the system.

version.py

This module defines the version of the cd_proxy_manager package.

examples/

This directory contains example scripts demonstrating how to use the various functionalities provided by the package.

Usage

Formatting Proxies

To format a proxy, see example in the examples folder.

Setting Environment Proxy

To set an environment proxy, use the set_env_proxy.py module:

from cd_proxy_manager import SysProxy

# Example: setting a proxy environment variable
proxy = "proxy:port"
SysProxy().set_proxy(proxy)

Proxy Management

To manage multiple proxies, use the proxy_dealer.py module:

from cd_proxy_manager import ProxyDealer

# Example: rotating proxies
dealer = ProxyDealer(["proxy1:port", "proxy2:port"])
proxy = dealer.get_next_proxy_no_shuffle()
print(proxy)

See all Examples

Refer to the examples/ directory for more detailed usage examples.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.

License

This project is licensed under the MIT License.

For more information, visit codedocta.com.

Release files for cd-proxy-manager 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cd-proxy-manager 0.2.6
File Size Uploaded
cd_proxy_manager-0.2.6.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cd-proxy-manager 0.2.6
File Interpreter ABI Platform
cd_proxy_manager-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / cd_proxy_manager-0.2.6.tar.gz

Download URL cd_proxy_manager-0.2.6.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fee37961ae83bd78330d6859d61415f8763a8e5239d1fc0b72172e2bc13fd657
BLAKE2b-256 checksum
How to use checksums
e56758f3acf7672483d1f05b55f1bd32f1a9de46fd0025f58f63710357263566
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Windows/10

Release files / cd_proxy_manager-0.2.6-py3-none-any.whl

Download URL cd_proxy_manager-0.2.6-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caa056c023e406d8c82f94417f320e09cef451dce41cb77bae6ef1b819cd0cb5
BLAKE2b-256 checksum
How to use checksums
1686a9558f51c2316575862a869e01496ea8e9313090cb2a892b2b28118f2030
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Windows/10

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page