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
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>#
- do_upgrade(request: proxy.http.parser.parser.HttpParser) bool [source]#
Signal web protocol handler to not upgrade websocket requests by default.
- async get_descriptors() Tuple[List[int], List[int]] [source]#
Implementations must return a list of descriptions that they wish to read from and write into.
- 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.
- on_client_data(request: proxy.http.parser.parser.HttpParser, raw: memoryview) Optional[memoryview] [source]#
Return None to avoid default webserver parsing of client data.