feat(proxy): add sticky-session proxy url support

This commit is contained in:
Anish Sarkar 2026-07-15 01:55:01 +05:30
parent 01fd6172ce
commit dafb0099c9
3 changed files with 41 additions and 6 deletions

View file

@ -67,6 +67,14 @@ class ProxyProvider(ABC):
return None
return {"http": proxy_url, "https": proxy_url}
def get_sticky_proxy_url(self, session_id: str) -> str | None:
"""Return a proxy URL pinned to ``session_id`` when supported.
Providers without vendor-specific session routing safely fall back to
their ordinary proxy URL.
"""
return self.get_proxy_url()
def get_location(self) -> str:
"""Return the proxy's configured exit region (e.g. ``"us"``), or ``""``.