aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tls_passthrough.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2016-06-14 16:29:15 +1200
committerGitHub <noreply@github.com>2016-06-14 16:29:15 +1200
commit93276d45be68790b5f4aeb4577c380ca1608efb3 (patch)
tree9553d0f45e705da04bfa4be8dd5e39d09fcd112f /examples/tls_passthrough.py
parent4c292b0197d820e9e108aa05b10927107a0503c3 (diff)
parentd8ae2f156203a81a8e6d325f5c460c351cfbfc5c (diff)
downloadmitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.tar.gz
mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.tar.bz2
mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.zip
Merge branch 'master' into netlibrace
Diffstat (limited to 'examples/tls_passthrough.py')
-rw-r--r--examples/tls_passthrough.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/tls_passthrough.py b/examples/tls_passthrough.py
index 0c6d450d..50aab65b 100644
--- a/examples/tls_passthrough.py
+++ b/examples/tls_passthrough.py
@@ -24,6 +24,7 @@ from __future__ import (absolute_import, print_function, division)
import collections
import random
+import sys
from enum import Enum
from mitmproxy.exceptions import TlsProtocolException
@@ -110,9 +111,9 @@ class TlsFeedback(TlsLayer):
# inline script hooks below.
-def start(context, argv):
- if len(argv) == 2:
- context.tls_strategy = ProbabilisticStrategy(float(argv[1]))
+def start(context):
+ if len(sys.argv) == 2:
+ context.tls_strategy = ProbabilisticStrategy(float(sys.argv[1]))
else:
context.tls_strategy = ConservativeStrategy()