27 December 2019: mitmproxy 5.0.1 * Fixed precompiled Linux binaries to not crash in table mode * Display webp images in mitmweb (@cixtor) 16 December 2019: mitmproxy 5.0 ** Major Changes ** * Added new Table UI (@Jessonsotoventura) * Added EKU extension to certificates. This fixes support for macOS Catalina (@vin01) ** Security Fixes ** * Fixed command injection vulnerabilities when exporting flows as curl/httpie commands (@cript0nauta) * Do not echo unsanitized user input in HTTP error responses (@fimad) ** Full Changelog ** * Moved to Github CI for Continuous Integration, dropping support for old Linux and macOS releases. (#3728) * Vastly improved command parsing, in particular for setting flow filters (@typoon) * Added a new flow export for raw responses (@mckeimic) * URLs are now edited in an external editor (@Jessonsotoventura) * mitmproxy now has a command history (@typoon) * Added terminal like keyboard shortcuts for the command bar (ctrl+w, ctrl+a, ctrl+f, ...) (@typoon) * Fixed issue with improper handling of non-ascii characters in URLs (@rjt-gupta) * Filtering can now use unicode characters (@rjt-gupta) * Fixed issue with user keybindings not being able to override default keybindings * Improved installation instructions * Added support for IPV6-only environments (@sethb157) * Fixed bug with server replay (@rjt-gupta) * Fixed issue with duplicate error responses (@ccssrryy) * Users can now set a specific external editor using $MITMPROXY_EDITOR (@rjt-gupta) * Config file can now be called `config.yml` or `config.yaml` (@ylmrx) * Fixed crash on `view.focus.[next|prev]` (@ylmrx) * Updated documentation to help using mitmproxy certificate on Android (@jannst) * Added support to parse IPv6 entries from `pfctl` on MacOS. (@tomlabaude) * Fixed instructions on how to build the documentation (@jannst) * Added a new `--allow-hosts` option (@pierlon) * Added support for zstd content-encoding (@tsaaristo) * Fixed issue where the replay server would corrupt the Date header (@tonyb486) * Improve speed for WebSocket interception (@MathieuBordere) * Fixed issue with parsing JPEG files. (@lusceu) * Improve example code style (@BoboTiG) * Fixed issue converting void responses to HAR (@worldmind) * Color coded http status codes in mitmweb (@arun-94) * Added organization to generated certificates (@Abcdefghijklmnopqrstuvwxyzxyz) * Errors are now displayed on sys.stderr (@JessicaFavin) * Fixed issue with replay timestamps (@rjt-gupta) * Fixed copying in mitmweb on macOS (@XZzYassin) Thanks
I am probably going to need this if I ever get back to work, so I may take it over in the next couple of days.
(In reply to Alex Barker from comment #1) > I am probably going to need this if I ever get back to work, so I may take > it over in the next couple of days. ZC just pushed a WIP ebuild into Pentoo overlay, FYI: https://github.com/pentoo/pentoo-overlay/commit/ee6a57cce020bc677c8cba18e198f3d927e128f7
Currently last-rited. Working on saving this...
(In reply to Sam James (sec padawan) from comment #3) > Currently last-rited. Working on saving this... Please to read this, thanks!
Just saw that you started work. I got a build working prior to seeing this but if you want to take it over I am good with that. There were a number of dependency updates and tweaks but it seems to be working with python 3.{6,7,8}. PR: https://github.com/gentoo/gentoo/pull/15512
(In reply to Alex Barker from comment #5) > Just saw that you started work. I got a build working prior to seeing this > but if you want to take it over I am good with that. There were a number of > dependency updates and tweaks but it seems to be working with python > 3.{6,7,8}. > > PR: https://github.com/gentoo/gentoo/pull/15512 No problem. I am happy for you to take it over.
Please let us know if you are still working on this. Some QA problems need fixing in the PR.
Since this was a showstopper for me, I’ve went ahead and emerged mitmproxy 5.1.1 from the PR [1], by dropping python 3.8 from the ebuild and adding python 3.7 to dev-python/kaitaistruct-0.8 as suggested. Everything else was already in portage. While seeming to work at first glance, one of my scripts crashed with an error: File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/server.py", line 121, in handle root_layer() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/modes/http_proxy.py", line 9, in __call__ layer() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 285, in __call__ layer() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http1.py", line 83, in __call__ layer() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http.py", line 190, in __call__ if not self._process_flow(flow): File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http.py", line 262, in _process_flow return self.handle_regular_connect(f) File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http.py", line 208, in handle_regular_connect layer() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 278, in __call__ self._establish_tls_with_client_and_server() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 358, in _establish_tls_with_client_and_server self._establish_tls_with_server() File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 448, in _establish_tls_with_server **args File "/usr/lib/python3.7/site-packages/mitmproxy/connections.py", line 292, in establish_tls self.convert_to_tls(cert=client_cert, sni=sni, **kwargs) File "/usr/lib/python3.7/site-packages/mitmproxy/net/tcp.py", line 386, in convert_to_tls **sslctx_kwargs File "/usr/lib/python3.7/site-packages/mitmproxy/net/tls.py", line 285, in create_client_context param = SSL._lib.SSL_CTX_get0_param(context._context) AttributeError: module 'lib' has no attribute 'SSL_CTX_get0_param' I’ve found something similar on the internet, and it was suggested to update dev-python/cryptography [2]. Indeed, mitmproxy-5.1.1 seems to have a requirement for dev-python/cryptography-2.9 [3]. My scripts have been working OK since I’ve updated to dev-python/cryptography-2.9. [1] https://github.com/gentoo/gentoo/pull/15512 [2] https://stackoverflow.com/questions/61391682/mitmproxy-5-1-1-always-crashed [3] https://github.com/mitmproxy/mitmproxy/commit/c1f01cc67c2adca177cd57b40169bf9dd771ac0b
Alex, are you still there? If not, I will take over and fix this to save it.
All of the issues should be resolved in the PR.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=450414ec5c12be4b58c6487d4e679381c7905c99 commit 450414ec5c12be4b58c6487d4e679381c7905c99 Author: Alexander Barker <alex@1stleg.com> AuthorDate: 2020-06-04 07:52:52 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-06-04 07:56:04 +0000 net-proxy/mitmproxy: Version Bump to 5.1.1 Closes: https://bugs.gentoo.org/708442 Bug: https://bugs.gentoo.org/718458 Signed-off-by: Alex Barker <alex@1stleg.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org> net-proxy/mitmproxy/Manifest | 1 + net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95 ++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+)
(In reply to Larry the Git Cow from comment #11) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=450414ec5c12be4b58c6487d4e679381c7905c99 > > commit 450414ec5c12be4b58c6487d4e679381c7905c99 > Author: Alexander Barker <alex@1stleg.com> > AuthorDate: 2020-06-04 07:52:52 +0000 > Commit: Joonas Niilola <juippis@gentoo.org> > CommitDate: 2020-06-04 07:56:04 +0000 > > net-proxy/mitmproxy: Version Bump to 5.1.1 > > Closes: https://bugs.gentoo.org/708442 > Bug: https://bugs.gentoo.org/718458 > > Signed-off-by: Alex Barker <alex@1stleg.com> > Signed-off-by: Joonas Niilola <juippis@gentoo.org> > > net-proxy/mitmproxy/Manifest | 1 + > net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95 > ++++++++++++++++++++++++++++++ > 2 files changed, 96 insertions(+) I see that this package has now been removed, despite the bump to 5.1.1 seemingly that addressed the python version issues. Was this oversight?
(In reply to Larry the Git Cow from comment #11) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=450414ec5c12be4b58c6487d4e679381c7905c99 > > commit 450414ec5c12be4b58c6487d4e679381c7905c99 > Author: Alexander Barker <alex@1stleg.com> > AuthorDate: 2020-06-04 07:52:52 +0000 > Commit: Joonas Niilola <juippis@gentoo.org> > CommitDate: 2020-06-04 07:56:04 +0000 > > net-proxy/mitmproxy: Version Bump to 5.1.1 > > Closes: https://bugs.gentoo.org/708442 > Bug: https://bugs.gentoo.org/718458 > > Signed-off-by: Alex Barker <alex@1stleg.com> > Signed-off-by: Joonas Niilola <juippis@gentoo.org> > > net-proxy/mitmproxy/Manifest | 1 + > net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95 > ++++++++++++++++++++++++++++++ > 2 files changed, 96 insertions(+) I see that this package has now been removed, despite the bump to 5.1.1 that seemingly addressed the python version issues. Was this oversight?
(In reply to Adrian Bassett from comment #13) > (In reply to Larry the Git Cow from comment #11) > > The bug has been closed via the following commit(s): > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > > ?id=450414ec5c12be4b58c6487d4e679381c7905c99 > > > > commit 450414ec5c12be4b58c6487d4e679381c7905c99 > > Author: Alexander Barker <alex@1stleg.com> > > AuthorDate: 2020-06-04 07:52:52 +0000 > > Commit: Joonas Niilola <juippis@gentoo.org> > > CommitDate: 2020-06-04 07:56:04 +0000 > > > > net-proxy/mitmproxy: Version Bump to 5.1.1 > > > > Closes: https://bugs.gentoo.org/708442 > > Bug: https://bugs.gentoo.org/718458 > > > > Signed-off-by: Alex Barker <alex@1stleg.com> > > Signed-off-by: Joonas Niilola <juippis@gentoo.org> > > > > net-proxy/mitmproxy/Manifest | 1 + > > net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95 > > ++++++++++++++++++++++++++++++ > > 2 files changed, 96 insertions(+) > > I see that this package has now been removed, despite the bump to 5.1.1 that > seemingly addressed the python version issues. Was this oversight? This has now been addressed, cf. https://bugs.gentoo.org/718458#c5