aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-12-11 00:26:01 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-12-11 00:29:35 +0100
commitb24d9654a97c2128b9fea6febbd4f12ad358ca98 (patch)
treef98955fd8142a106a101a11fb26103b49eaf9076
parent8112bce42413bfb056022002667ccda4090df615 (diff)
downloadmitmproxy-b24d9654a97c2128b9fea6febbd4f12ad358ca98.tar.gz
mitmproxy-b24d9654a97c2128b9fea6febbd4f12ad358ca98.tar.bz2
mitmproxy-b24d9654a97c2128b9fea6febbd4f12ad358ca98.zip
disable http2 by default, add explicit on/off switches
As long as major HTTP/2 implementers fail to implement the spec correctly, we need to disable HTTP/2 by default. We expect this to be fixed with the next release and re-enabled by default. https://github.com/mitmproxy/mitmproxy/issues/1745 https://github.com/mitmproxy/mitmproxy/issues/1824
-rw-r--r--mitmproxy/tools/cmdline.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/mitmproxy/tools/cmdline.py b/mitmproxy/tools/cmdline.py
index 925491d7..a8f04f8d 100644
--- a/mitmproxy/tools/cmdline.py
+++ b/mitmproxy/tools/cmdline.py
@@ -451,19 +451,21 @@ def proxy_options(parser):
action="store", type=int, dest="port",
help="Proxy service port."
)
- group.add_argument(
- "--no-http2",
- action="store_false", dest="http2",
- help="""
- Explicitly disable HTTP/2 support.
- If your OpenSSL version supports ALPN, HTTP/2 is enabled by default.
- """
- )
- group.add_argument(
- "--no-websocket",
- action="store_false", dest="websocket",
- help="Explicitly disable WebSocket support."
- )
+
+ http2 = group.add_mutually_exclusive_group()
+ http2.add_argument("--http2", action="store_true", dest="http2")
+ http2.add_argument("--no-http2", action="store_false", dest="http2",
+ help="Explicitly enable/disable HTTP/2 support. "
+ "Disabled by default until major websites implement the spec correctly. "
+ "Default value will change in a future version."
+ )
+
+ websocket = group.add_mutually_exclusive_group()
+ websocket.add_argument("--no-websocket", action="store_false", dest="websocket",
+ help="Explicitly enable/disable WebSocket support. "
+ "Enabled by default."
+ )
+ websocket.add_argument("--websocket", action="store_true", dest="websocket")
parser.add_argument(
"--upstream-auth",