proxy.core.base.tcp_upstream 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.core.base.tcp_upstream.TcpUpstreamConnectionHandler(*args: Any, **kwargs: Any)[source]#

Bases: abc.ABC

TcpUpstreamConnectionHandler can be used to insert an upstream server connection lifecycle.

Call initialize_upstream to initialize the upstream connection object. Then, directly use self.upstream object within your class.

See ProxyPoolPlugin for example usage.

_abc_impl = <_abc._abc_data object>#
async get_descriptors() Tuple[List[int], List[int]][source]#
abstract handle_upstream_data(raw: memoryview) None[source]#
initialize_upstream(addr: str, port: int) None[source]#
async read_from_descriptors(r: List[int]) bool[source]#
upstream: Optional[proxy.core.connection.server.TcpServerConnection]#
async write_to_descriptors(w: List[int]) bool[source]#