diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2018-05-05 13:56:41 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2018-05-05 14:38:02 +0200 |
commit | 54e2daa21e2c56c7c1469ce4239f9a4ff7815bc4 (patch) | |
tree | 9468875c8d1adf7afc44e1f12f37e9eab7d9cb2c /mitmproxy | |
parent | 5f74adc2df6d2a9452a9e3a6923fe05ba579e9e6 (diff) | |
download | mitmproxy-54e2daa21e2c56c7c1469ce4239f9a4ff7815bc4.tar.gz mitmproxy-54e2daa21e2c56c7c1469ce4239f9a4ff7815bc4.tar.bz2 mitmproxy-54e2daa21e2c56c7c1469ce4239f9a4ff7815bc4.zip |
fix #3024
Diffstat (limited to 'mitmproxy')
-rw-r--r-- | mitmproxy/addons/allowremote.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mitmproxy/addons/allowremote.py b/mitmproxy/addons/allowremote.py index f1d3d8fb..ad4c4940 100644 --- a/mitmproxy/addons/allowremote.py +++ b/mitmproxy/addons/allowremote.py @@ -14,11 +14,13 @@ class AllowRemote: ) def clientconnect(self, layer): - address = layer.client_conn.address + address = ipaddress.ip_address(layer.client_conn.address[0]) + if isinstance(address, ipaddress.IPv6Address): + address = address.ipv4_mapped or address accept_connection = ( ctx.options.allow_remote or - ipaddress.ip_address(address[0]).is_private or + ipaddress.ip_address(address).is_private or ctx.options.proxyauth is not None ) |