proxy.server Module

Proxy Tools

class wpull.proxy.server.HTTPProxyServer(http_client: wpull.protocol.http.client.Client)[source]

Bases: wpull.application.hook.HookableMixin

HTTP proxy server for use with man-in-the-middle recording.

This function is meant to be used as a callback:

asyncio.start_server(HTTPProxyServer(HTTPClient))
Parameters:http_client (http.client.Client) – The HTTP client.
request_callback

A callback function that accepts a Request.

pre_response_callback

A callback function that accepts a Request and Response

response_callback

A callback function that accepts a Request and Response

class Event[source]

Bases: enum.Enum

class wpull.proxy.server.HTTPProxySession(http_client: wpull.protocol.http.client.Client, reader: asyncio.streams.StreamReader, writer: asyncio.streams.StreamWriter)[source]

Bases: wpull.application.hook.HookableMixin

class Event[source]

Bases: enum.Enum