⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.
2013-present by Abhinav Singh and contributors.
BSD, see LICENSE for more details.
- class proxy.plugin.program_name.ProgramNamePlugin(*args: Any, **kwargs: Any)#
Tries to identify the application connecting to the proxy instance. This is only possible when connection itself originates from the same machine where the proxy instance is running.
- _abc_impl = <_abc._abc_data object>#
- before_upstream_connection(request: proxy.http.parser.parser.HttpParser) Optional[proxy.http.parser.parser.HttpParser] #
Handler called just before Proxy upstream connection is established.
Return optionally modified request object. If None is returned, upstream connection won’t be established.
Raise HttpRequestRejected or HttpProtocolException directly to drop the connection.
- on_access_log(context: Dict[str, Any]) Optional[Dict[str, Any]] #
Use this method to override default access log format (see DEFAULT_HTTP_ACCESS_LOG_FORMAT and DEFAULT_HTTPS_ACCESS_LOG_FORMAT) and to add/update/modify/delete context for next plugin.on_access_log invocation.
This is specially useful if a plugins want to provide extra context in the access log which may not available within other plugins’ context or even in proxy.py core.
Returns Log context or None. If plugin chooses to access log, they ideally must return None to prevent other plugin.on_access_log invocation.