mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-22 23:31:12 +02:00
feat(proxy): add sticky-session proxy url support
This commit is contained in:
parent
01fd6172ce
commit
dafb0099c9
3 changed files with 41 additions and 6 deletions
|
|
@ -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 ``""``.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue