How its wsgi_flask_app.py supposed to work?

Hello

I´m trying to use the example provided at https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/wsgi_flask_app.py

But i´m not able to make it work

My idea is to use this as the starting point to mock server enpoint responses
but dont know how to run the provided example

I mean, i´m running it with the -s parameter for mitmdump and mitmproxy but with no result,
when going to the example.com domain shows the original page :frowning:

i have configured the proxy at the system level and i have checked that if there is no running one of the mentioned commands there is no navigation… so yes the proxy is correctly configured

what i´m missing?

thanks

Nevermind, just realized that the example is wrong

should perform the action ad the “start()” event

now i´m it in this way:

networksetup -setwebproxy Wi-Fi 127.0.0.1 8080
networksetup -setwebproxystate Wi-Fi on

mitmdump -v -s app.py

networksetup -setwebproxystate Wi-Fi off

That inside script and running with sudo to be able to change the system proxy, when killed the mitmdump, disable proxy