portage.util.socks5 module¶
- class portage.util.socks5.ProxyManager¶
Bases:
object
A class to start and control a single running SOCKSv5 server process for Portage.
- is_running()¶
Check whether the SOCKSv5 server is running.
- Returns
True if the server is running, False otherwise
- async ready()¶
Wait for the proxy socket to become ready. This method is a coroutine.
- start(settings)¶
Start the SOCKSv5 server.
- Parameters
settings – Portage settings instance (used to determine
paths) :type settings: portage.config
- stop()¶
Stop the SOCKSv5 server.
- portage.util.socks5.get_socks5_proxy(settings)¶
Get UNIX socket path for a SOCKSv5 proxy. A new proxy is started if one isn’t running yet, and an atexit event is added to stop the proxy on exit.
- Parameters
settings (portage.config) – Portage settings instance (used to determine paths)
- Returns
(string) UNIX socket path