diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-02-26 11:26:32 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-02-26 11:26:32 +1300 |
commit | 7bd63ee713650f2c22f3193f52a793f92eea75c4 (patch) | |
tree | c408223978e4a43b1841a749d7718ed59c750801 /mitmproxy/options.py | |
parent | e5cdc20eb8cd8ebf5ab0ab8bd5ae9889054821df (diff) | |
download | mitmproxy-7bd63ee713650f2c22f3193f52a793f92eea75c4.tar.gz mitmproxy-7bd63ee713650f2c22f3193f52a793f92eea75c4.tar.bz2 mitmproxy-7bd63ee713650f2c22f3193f52a793f92eea75c4.zip |
Start consolidating core options
This is a preparatory patch that paves the way to consolidating our core
options in the core addon. It amalgamates the core_option_validation and core
addons, prepares the test suite for a world where options live in core, and
moves over two trivial options as a trial balloon.
From here, things will get harder, but at the end of the process we'll have a
core that's responsive to options.
Diffstat (limited to 'mitmproxy/options.py')
-rw-r--r-- | mitmproxy/options.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/mitmproxy/options.py b/mitmproxy/options.py index b6f3398b..ce7597a8 100644 --- a/mitmproxy/options.py +++ b/mitmproxy/options.py @@ -10,37 +10,6 @@ LISTEN_PORT = 8080 class Options(optmanager.OptManager): - if False: - # This provides type hints for IDEs (e.g. PyCharm) and mypy. - # Autogenerated using test/helper_tools/typehints_for_options.py - add_upstream_certs_to_client_chain = None # type: bool - body_size_limit = None # type: Optional[str] - cadir = None # type: str - certs = None # type: Sequence[str] - ciphers_client = None # type: Optional[str] - ciphers_server = None # type: Optional[str] - client_certs = None # type: Optional[str] - http2 = None # type: bool - http2_priority = None # type: bool - ignore_hosts = None # type: Sequence[str] - keep_host_header = None # type: bool - listen_host = None # type: str - listen_port = None # type: int - mode = None # type: str - rawtcp = None # type: bool - server = None # type: bool - showhost = None # type: bool - spoof_source_address = None # type: bool - ssl_insecure = None # type: bool - ssl_verify_upstream_trusted_ca = None # type: Optional[str] - ssl_verify_upstream_trusted_cadir = None # type: Optional[str] - ssl_version_client = None # type: str - ssl_version_server = None # type: str - tcp_hosts = None # type: Sequence[str] - upstream_bind_address = None # type: str - upstream_cert = None # type: bool - websocket = None # type: bool - def __init__(self, **kwargs) -> None: super().__init__() self.add_option( @@ -61,13 +30,6 @@ class Options(optmanager.OptManager): """ ) self.add_option( - "body_size_limit", Optional[str], None, - """ - Byte size limit of HTTP request and response bodies. Understands - k/m/g suffixes, i.e. 3m for 3 megabytes. - """ - ) - self.add_option( "cadir", str, CA_DIR, "Location of the default mitmproxy CA files." ) @@ -128,13 +90,6 @@ class Options(optmanager.OptManager): "upstream_cert", bool, True, "Connect to upstream server to look up certificate details." ) - self.add_option( - "keep_host_header", bool, False, - """ - Reverse Proxy: Keep the original host header instead of rewriting it - to the reverse proxy target. - """ - ) self.add_option( "http2", bool, True, |