proxy.http.server.reverse 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.http.server.reverse.ReverseProxy(*args: Any, **kwargs: Any)[source]#

Bases: proxy.core.base.tcp_upstream.TcpUpstreamConnectionHandler, proxy.http.server.plugin.HttpWebServerBasePlugin

Extend in-built Web Server to add Reverse Proxy capabilities.

_abc_impl = <_abc._abc_data object>#
handle_request(request: proxy.http.parser.parser.HttpParser) None[source]#

Handle the request and serve response.

handle_upstream_data(raw: memoryview) None[source]#
on_access_log(context: Dict[str, Any]) Optional[Dict[str, Any]][source]#

Use this method to override default access log format (see DEFAULT_WEB_ACCESS_LOG_FORMAT) or to add/update/modify passed context for usage by default access logger.

Return updated log context to use for default logging format, OR Return None if plugin has logged the request.

on_client_connection_close() None[source]#

Client has closed the connection, do any clean up task now.

routes() List[Tuple[int, str]][source]#

Return List(protocol, path) that this plugin handles.