aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 7b2f9bfe..e8d98d16 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -231,6 +231,9 @@ class ProxyHandler(tcp.BaseHandler):
sc.rfile.reset_timestamps()
try:
tsstart = utils.timestamp()
+ peername = sc.connection.getpeername()
+ if peername:
+ request.ip = peername[0]
httpversion, code, msg, headers, content = http.read_response(
sc.rfile,
request.method,