diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-08-08 03:38:59 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-08-08 03:38:59 +0200 |
commit | a3c3e4e50434a891d702ee023d0b8925e513aa1d (patch) | |
tree | 0c73ab4e9c2789faa7611f53de4f83da20ab85a1 /libmproxy/platform/windows.py | |
parent | a9e6121a08c745961992c9fd2b4e4593063192f5 (diff) | |
download | mitmproxy-a3c3e4e50434a891d702ee023d0b8925e513aa1d.tar.gz mitmproxy-a3c3e4e50434a891d702ee023d0b8925e513aa1d.tar.bz2 mitmproxy-a3c3e4e50434a891d702ee023d0b8925e513aa1d.zip |
remove platform.setup
Diffstat (limited to 'libmproxy/platform/windows.py')
-rw-r--r-- | libmproxy/platform/windows.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmproxy/platform/windows.py b/libmproxy/platform/windows.py index 2734bffb..8c10421b 100644 --- a/libmproxy/platform/windows.py +++ b/libmproxy/platform/windows.py @@ -18,6 +18,8 @@ PROXY_API_PORT = 8085 class Resolver(object): def __init__(self): + TransparentProxy.setup() + self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.connect(("127.0.0.1", PROXY_API_PORT)) @@ -140,13 +142,13 @@ class TransparentProxy(object): self.handle_icmp = self.driver.open_handle(filter="icmp", layer=Layer.NETWORK, flags=Flag.DROP) @classmethod - def setup(cls, options): + def setup(cls): # TODO: Make sure that server can be killed cleanly. That's a bit difficult as we don't have access to # controller.should_exit when this is called. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_unavailable = s.connect_ex(("127.0.0.1", PROXY_API_PORT)) if server_unavailable: - proxifier = TransparentProxy(proxy_addr=options.addr, proxy_port=options.port) + proxifier = TransparentProxy() proxifier.start() def start(self): |