From 54ee135f655bd17759b7d1acf965d3d9583cab32 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 29 May 2018 15:15:07 +0200 Subject: [PATCH] windows transparent mode: always recalculate checksum --- mitmproxy/platform/windows.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mitmproxy/platform/windows.py b/mitmproxy/platform/windows.py index 7e4b48fe..b849afa5 100644 --- a/mitmproxy/platform/windows.py +++ b/mitmproxy/platform/windows.py @@ -338,7 +338,9 @@ class RedirectLocal(Redirect): if pid not in self.trusted_pids: self.redirect_request(packet) else: - self.windivert.send(packet, recalculate_checksum=False) + # It's not really clear why we need to recalculate the checksum here, + # but this was identified as necessary in https://github.com/mitmproxy/mitmproxy/pull/3174. + self.windivert.send(packet, recalculate_checksum=True) TConnection = typing.Tuple[str, int]