diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-05-29 01:23:39 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-29 01:23:39 -0700 |
commit | 17382b963e22de8cb395a99e529b256e03d440ce (patch) | |
tree | bad14d80e1580995be2fc48780669bba747b8552 /examples/tls_passthrough.py | |
parent | 8638000cfa859ca2ae5fb39c58cbdf5e6fc10c19 (diff) | |
download | mitmproxy-17382b963e22de8cb395a99e529b256e03d440ce.tar.gz mitmproxy-17382b963e22de8cb395a99e529b256e03d440ce.tar.bz2 mitmproxy-17382b963e22de8cb395a99e529b256e03d440ce.zip |
format examples
Diffstat (limited to 'examples/tls_passthrough.py')
-rw-r--r-- | examples/tls_passthrough.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/tls_passthrough.py b/examples/tls_passthrough.py index 8c8fa4eb..23afe3ff 100644 --- a/examples/tls_passthrough.py +++ b/examples/tls_passthrough.py @@ -40,6 +40,7 @@ class _TlsStrategy(object): """ Abstract base class for interception strategies. """ + def __init__(self): # A server_address -> interception results mapping self.history = collections.defaultdict(lambda: collections.deque(maxlen=200)) @@ -78,6 +79,7 @@ class ProbabilisticStrategy(_TlsStrategy): """ Fixed probability that we intercept a given connection. """ + def __init__(self, p): self.p = p super(ProbabilisticStrategy, self).__init__() |