proxy.proxy module#

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

  1. 2013-present by Abhinav Singh and contributors.


BSD, see LICENSE for more details.

class proxy.proxy.Proxy(input_args: Optional[List[str]] = None, **opts: Any)[source]#

Bases: object

Proxy is a context manager to control library core.

By default, AcceptorPool is started with HttpProtocolHandler work class. By definition, it expects HTTP traffic to flow between clients and server.

In --threadless mode and without --local-executor, a ThreadlessPool is also started. Executor pool receives newly accepted work by Acceptor and creates an instance of work class for processing the received work.

In --threadless mode and with --local-executor 0, acceptors will start a companion thread to handle accepted client connections.

Optionally, Proxy class also initializes the EventManager. A multi-process safe pubsub system which can be used to build various patterns for message sharing and/or signaling.

_delete_pid_file() None[source]#
_delete_port_file() None[source]#
static _handle_exit_signal(signum: int, _frame: Any) None[source]#
_handle_siginfo(_signum: int, _frame: Any) None[source]#
_register_signals() None[source]#
static _setup_tunnel(flags: argparse.Namespace, ssh_handler_klass: Optional[Type[BaseSshTunnelHandler]] = None, ssh_listener_klass: Optional[Any] = None, **kwargs: Any) proxy.core.ssh.base.BaseSshTunnelListener[source]#
_write_pid_file() None[source]#
_write_port_file() None[source]#
property remote_executors_enabled: bool#
setup() None[source]#
shutdown() None[source]#
proxy.proxy.entry_point() None[source]#
proxy.proxy.grout() None[source]#
proxy.proxy.main(**opts: Any) None[source]#
proxy.proxy.sleep_loop(p: Optional[proxy.proxy.Proxy] = None) None[source]#