aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/platform
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/platform')
-rw-r--r--libmproxy/platform/linux.py1
-rw-r--r--libmproxy/platform/windows.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/libmproxy/platform/linux.py b/libmproxy/platform/linux.py
index e60a9950..38bfbe42 100644
--- a/libmproxy/platform/linux.py
+++ b/libmproxy/platform/linux.py
@@ -6,6 +6,7 @@ SO_ORIGINAL_DST = 80
class Resolver(object):
+
def original_addr(self, csock):
odestdata = csock.getsockopt(socket.SOL_IP, SO_ORIGINAL_DST, 16)
_, port, a1, a2, a3, a4 = struct.unpack("!HHBBBBxxxxxxxx", odestdata)
diff --git a/libmproxy/platform/windows.py b/libmproxy/platform/windows.py
index 09a4422f..9fe04cfa 100644
--- a/libmproxy/platform/windows.py
+++ b/libmproxy/platform/windows.py
@@ -18,6 +18,7 @@ PROXY_API_PORT = 8085
class Resolver(object):
+
def __init__(self):
TransparentProxy.setup()
self.socket = None
@@ -53,6 +54,7 @@ class Resolver(object):
class APIRequestHandler(SocketServer.StreamRequestHandler):
+
"""
TransparentProxy API: Returns the pickled server address, port tuple
for each received pickled client address, port tuple.
@@ -77,6 +79,7 @@ class APIRequestHandler(SocketServer.StreamRequestHandler):
class APIServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
+
def __init__(self, proxifier, *args, **kwargs):
SocketServer.TCPServer.__init__(self, *args, **kwargs)
self.proxifier = proxifier
@@ -110,6 +113,7 @@ def MIB_TCPTABLE2(size):
class TransparentProxy(object):
+
"""
Transparent Windows Proxy for mitmproxy based on WinDivert/PyDivert.