Cannot get configuration settings "mode" and "showhost" to work


Hi! I’m trying to upgrade mitmproxy from 0.18.2 to 2.0.2. This is my old configuration file (~/.mitmproxy/mitmproxy.conf):

transparent = true
host = true
script = [/opt/mitm/scripts/]
ignore = []

Using as a reference, I wrote this configuration file for 2.0.2 (~/.mitmproxy/config.yaml):

mode: transparent
showhost: true
scripts: [/opt/mitm/scripts/]
ignore_hosts: []

But the mode and showhost settings appear to be ignored. With 0.18.2, I could just stick the equivalent settings in the config file, and drop the -T --host options when launching mitmproxy. This does not work for me on 2.0.2. If I launch it with -T, proxying works, but the showhost option is still not enabled. What am I doing wrong, how do I fix it?


Hi @secretpow!

Sorry for the trouble - we had a bug in this in 2.0 (, this should be fixed with the next release.