proxy.plugin.modify_chunk_response 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.plugin.modify_chunk_response.ModifyChunkResponsePlugin(*args: Any, **kwargs: Any)[source]#

Bases: proxy.http.proxy.plugin.HttpProxyBasePlugin

Accumulate & modify chunk responses as received from upstream.

DEFAULT_CHUNKS = [b'modify', b'chunk', b'response', b'plugin']#
_abc_impl = <_abc._abc_data object>#
handle_upstream_chunk(chunk: memoryview) Optional[memoryview][source]#

Handler called right after receiving raw response from upstream server.

For HTTPS connections, chunk will be encrypted unless TLS interception is also enabled.

Return None if you don’t want to sent this chunk to the client.