Couldn't use mitmproxy for download file


Mitmproxy : 3.0.4
Python : 3.5.2
OpenSSL : OpenSSL 1.1.0h
Platform : Linux-4.10.0-38-generic-x86_64-with-LinuxMint-18.3-sylvia

I am running mitmproxy in docker as transparent mode, and use iptables to redirect traffic to its port. In docker, I use --net host.

Syntax that I’m use to run mitmproxy is:
mitmdump --anticache --anticomp -v --mode transparent --showhost --set client_certs=~/.mitmproxy -w output_file -p 49153

Than my iptables:

iptables -t nat -I PREROUTING 1 -s -p tcp --dport 80 -j REDIRECT --to-ports 49153
iptables -t nat -I PREROUTING 1 -s -p tcp --dport 443 -j REDIRECT --to-ports 49153

My client IP is Client can open HTTP or HTTPS website. Client also can check speed using speedtest. But why client can’t download file?

I try wget, but nothing. When I try didn’t use mitmproxy, client can download it.

Is there any mistake that I do?