import abc
from _typeshed import Incomplete
from abc import ABC, abstractmethod
class ProxyConfig:
server: Incomplete
username: Incomplete
password: Incomplete
ip: Incomplete
def __init__(self, server: str, username: str | None = None, password: str | None = None, ip: str | None = None) -> None: ...
@staticmethod
def from_string(proxy_str: str) -> ProxyConfig: ...
@staticmethod
def from_dict(proxy_dict: dict) -> ProxyConfig: ...
@staticmethod
def from_env(env_var: str = 'PROXIES') -> list['ProxyConfig']: ...
def to_dict(self) -> dict: ...
def clone(self, **kwargs) -> ProxyConfig: ...
class ProxyRotationStrategy(ABC, metaclass=abc.ABCMeta):
@abstractmethod
async def get_next_proxy(self) -> ProxyConfig | None: ...
@abstractmethod
def add_proxies(self, proxies: list[ProxyConfig]): ...
class RoundRobinProxyStrategy:
def __init__(self, proxies: list[ProxyConfig] = None) -> None: ...
def add_proxies(self, proxies: list[ProxyConfig]): ...
async def get_next_proxy(self) -> ProxyConfig | None: ...