aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 938c4d21..4c29d747 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -104,9 +104,9 @@ class Request(controller.Msg):
)
@classmethod
- def from_state(klass, state):
+ def from_state(klass, client_conn, state):
return klass(
- ClientConnection(None),
+ client_conn,
state["host"],
state["port"],
state["scheme"],
@@ -230,6 +230,13 @@ class ClientConnection(controller.Msg):
self.address = address
controller.Msg.__init__(self)
+ def get_state(self):
+ return self.address
+
+ @classmethod
+ def from_state(klass, state):
+ return klass(state)
+
def set_replay(self):
self.address = None