LibraryActive

mitmproxy.net.server_spec

Parses server mode specifications for mitmproxy, supporting schemes like http, https, http3, tls, dtls, tcp, udp, dns, quic.

Open source page

Field note

What it does

A Python module for parsing server mode specifications used to describe upstream proxies or servers. It validates hostnames and ports, and supports default ports for known schemes.

Capabilities

Available capabilities

No use cases filed yet.

Tags

Tags

Ways to use it

Ways to use it

No integrations filed yet.

Product features

Product features

Parse server spec

Parses server mode specifications with optional scheme, host, and port, defaulting ports for known schemes.

Validate host and port

Validates hostnames and ports, raising ValueError for invalid input.