OpenVPN with mitproxy

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 : Traceback (most recent call last):
** File “/usr/lib/python2.7/dist-packages/libmproxy/proxy/”, line 120, in handle**
** root_layer()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/proxy/modes/”, line 10, in call**
** layer()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/”, line 267, in call**
** self._establish_tls_with_client_and_server()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/”, line 392, in _establish_tls_with_client_and_server**
** six.reraise(sys.exc_info())*
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/”, line 389, in _establish_tls_with_client_and_server**
** self._establish_tls_with_client()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/”, line 398, in _establish_tls_with_client**
** cert, key, chain_file = self._find_cert()**
** File “/usr/lib/python2.7/dist-packages/libmproxy/protocol/”, line 497, in _find_cert**
** host =**
AttributeError: ‘NoneType’ object has no attribute 'host’

Please help me…

My mitmproxy version is -0.15