⚡⚡⚡ 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.cloudflare_dns.CloudflareDnsResolverPlugin(uid: str, flags: argparse.Namespace, client: proxy.http.connection.HttpClientConnection, event_queue: proxy.core.event.queue.EventQueue, upstream_conn_pool: Optional[UpstreamConnectionPool] = None)#
This plugin uses Cloudflare DNS resolver to provide protection against malware and adult content. Implementation uses DoH specification.
For this plugin to work, make sure to bypass proxy for 220.127.116.11
This plugin requires additional dependency because DoH mandates a HTTP2 complaint client. Install
pip install "httpx[http2]"
- _abc_impl = <_abc._abc_data object>#
- resolve_dns(host: str, port: int) Tuple[Optional[str], Optional[Tuple[str, int]]] #
Resolve upstream server host to an IP address.
Optionally also override the source address to use for connection with upstream server.
For upstream IP: Return None to use default resolver available to the system. Return IP address as string to use your custom resolver.
For source address: Return None to use default source address Return 2-tuple representing (host, port) to use as source address