diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-05-29 11:03:54 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-05-29 11:03:54 +0200 |
commit | c707479bcd5a8ebb5d6bc8f54a5879176db46b3a (patch) | |
tree | 8fb49cb2bfa2f68b2841f2a4028c91eb781e4587 /examples/tls_passthrough.py | |
parent | 979c7fc319cbf551b9ea14062387f195b208b8fa (diff) | |
parent | 17382b963e22de8cb395a99e529b256e03d440ce (diff) | |
download | mitmproxy-c707479bcd5a8ebb5d6bc8f54a5879176db46b3a.tar.gz mitmproxy-c707479bcd5a8ebb5d6bc8f54a5879176db46b3a.tar.bz2 mitmproxy-c707479bcd5a8ebb5d6bc8f54a5879176db46b3a.zip |
Merge pull request #1173 from mitmproxy/format-examples
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__() |