aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol2/messages.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-08-30 01:21:58 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-08-30 01:21:58 +0200
commitdd7f50d64bef38fa67b4cace91913d03691dde26 (patch)
treec183aa1f286ec191a094713d1f697f2fa54ab385 /libmproxy/protocol2/messages.py
parent100ea27c30d89b895a02a1b128edc5472ab84b3e (diff)
downloadmitmproxy-dd7f50d64bef38fa67b4cace91913d03691dde26.tar.gz
mitmproxy-dd7f50d64bef38fa67b4cace91913d03691dde26.tar.bz2
mitmproxy-dd7f50d64bef38fa67b4cace91913d03691dde26.zip
restructure code, remove cruft
Diffstat (limited to 'libmproxy/protocol2/messages.py')
-rw-r--r--libmproxy/protocol2/messages.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/libmproxy/protocol2/messages.py b/libmproxy/protocol2/messages.py
deleted file mode 100644
index de049486..00000000
--- a/libmproxy/protocol2/messages.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-This module contains all valid messages layers can send to the underlying layers.
-"""
-from __future__ import (absolute_import, print_function, division)
-from netlib.tcp import Address
-
-
-class _Message(object):
- def __eq__(self, other):
- # Allow message == Connect checks.
- if isinstance(self, other):
- return True
- return self is other
-
- def __ne__(self, other):
- return not self.__eq__(other)
-
-
-class Connect(_Message):
- """
- Connect to the server
- """
-
-
-class Reconnect(_Message):
- """
- Re-establish the server connection
- """
-
-
-class SetServer(_Message):
- """
- Change the upstream server.
- """
-
- def __init__(self, address, server_tls, sni, depth=1):
- self.address = Address.wrap(address)
- self.server_tls = server_tls
- self.sni = sni
-
- # upstream proxy scenario: you may want to change either the final target or the upstream proxy.
- # We can express this neatly as the "nth-server-providing-layer"
- # ServerConnection could get a `via` attribute.
- self.depth = depth
-
-