Hello Guys,
I have mitmproxy running on a ubuntu machine and on same machine OpenVPN is running. I am able to see the logs for all http and https request on terminal.
The Iptable rule implemented is like .
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 443 -j REDIRECT --to-port 8080
But, If we try to run “mitmdump -s /home/ubuntu/test.log”. It is giving me an error like :
10.8.168.142:52162: Traceback (most recent call last):
** File “/usr/lib/python2.7/dist-packages/libmproxy/proxy/server.py”, line 120, in handle**
** root_layer()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/proxy/modes/http_proxy.py”, line 10, in call**
** layer()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/tls.py”, line 267, in call**
** self._establish_tls_with_client_and_server()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/tls.py”, line 392, in _establish_tls_with_client_and_server**
** six.reraise(sys.exc_info())*
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/tls.py”, line 389, in _establish_tls_with_client_and_server**
** self._establish_tls_with_client()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/tls.py”, line 398, in _establish_tls_with_client**
** cert, key, chain_file = self._find_cert()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/tls.py”, line 497, in _find_cert**
** host = self.server_conn.address.host**
AttributeError: ‘NoneType’ object has no attribute 'host’
Please help me…
My mitmproxy version is -0.15