Circuit Module
This module provides objects for managing TOR docker instances.
OnionCircuit
A TOR Docker Container Object.
Attributes:
container_options
ContainerOptions - Container Options for TOR docker instance.
OnionCircuits
def OnionCircuits(onion_count: int, startup_with_threads: bool = False, max_threads: int = 2, thread_pool_timeout: Optional[int] = None, show_log: bool = False) -> ContextManager[List[OnionCircuit]]
Context manager which yields a list of started TOR containers.
Takes care of starting and stopping multiple docker container instances of TOR.
Arguments:
onion_count
int - Number of TOR docker container instances to start.start_with_threads
bool - If True uses threads to start up the containers.max_threads
int - Max number of threads to use to start up the containers.thread_pool_timeout
Optional[int] - Timeout for ThreadPoolExecutor.show_log
bool - If True shows the containers logs.Yields:
List[OnionCircuit]
- A list of started OnionCircuit objects.