proxy.common.plugins module#

proxy.py#

⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.

copyright
  1. 2013-present by Abhinav Singh and contributors.

license

BSD, see LICENSE for more details.

class proxy.common.plugins.Plugins[source]#

Bases: object

Common utilities for plugin discovery.

static discover(input_args: List[str]) None[source]#

Search for external plugin found in command line arguments, then iterates over each value and discover/import the plugin.

static from_bytes(pyc: bytes, name: str) module[source]#
static importer(plugin: Union[bytes, type]) Tuple[type, str][source]#

Import and returns the plugin.

static load(plugins: List[Union[bytes, type]], abc_plugins: Optional[List[str]] = None) Dict[bytes, List[type]][source]#

Accepts a list Python modules, scans them to identify if they are an implementation of abstract plugin classes and returns a dictionary of matching plugins for each abstract class.

static resolve_plugin_flag(flag_plugins: Any, opt_plugins: Optional[Any] = None) List[Union[bytes, type]][source]#