Commit Graph

9976 Commits

Author SHA1 Message Date
Maximilian Hils 0afc48b714 Revert "use stdlib logging instead of Log command"
This reverts commit f2787be057.
2022-09-16 20:57:39 +02:00
Maximilian Hils f2787be057 use stdlib logging instead of Log command 2022-09-16 20:57:25 +02:00
Maximilian Hils 780adbaf9b fix #5584 2022-09-15 14:06:22 +02:00
Maximilian Hils b78869b584
Merge pull request #5582 from mhils/http3-contentview
Add HTTP/3 contentview
2022-09-13 09:06:51 +02:00
Maximilian Hils f6ac500698 add HTTP/3 content view 2022-09-13 09:00:09 +02:00
Maximilian Hils b5d06863b3 fix layout cycling 2022-09-12 19:05:19 +02:00
Maximilian Hils 1054f13c13
move `get_local_ip` out of platform-specific code (#5579) 2022-09-11 18:40:16 +02:00
Francisco Boni f9899fdd44
Improve http_manipulate_cookies.py example (#5578)
Improve the example helper functions to use the get_all functions recommended
in the Header class docs for use with cookies data. This will avoid errors when
dealing with multiple headers.

cf655a664f/mitmproxy/http.py (L148)
cf655a664f/mitmproxy/http.py (L91)
2022-09-11 15:58:29 +02:00
Aldo Cortesi ea23f1cc29
[requires.io] dependency update (#5577)
Co-authored-by: requires.io <support@requires.io>
2022-09-11 13:31:14 +02:00
Aldo Cortesi a5f2a03ce3
[requires.io] dependency update on main branch (#5573)
* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

Co-authored-by: requires.io <support@requires.io>
2022-09-10 17:05:17 +02:00
Maximilian Hils 57c71ea5bc update CHANGELOG 2022-09-09 17:35:06 +02:00
shuyiLiu 3ccfad1896
fix issue #5198: mitmWeb crash (#5507)
* fix issue #5198: mitmWeb crash

* fix mitmWeb crash

* test cases

* fix test cases

* fix mistake

* update snapshots

* why line221 not covered by test?

Co-authored-by: liushuyi.sputnik <liushuyi.sputnik@bytedance.com>
2022-09-09 17:27:25 +02:00
sanlengjingvv 9223c178c9
Make mitmweb use option "content_view_lines_cutoff" (#5548) 2022-09-09 17:20:30 +02:00
Maximilian Hils 8023b22498
Docker: assume uid of who holds permissions (#5550)
* Docker: assume uid of who holds permissions

* add docs
2022-09-08 17:42:09 +00:00
Manuel Meitinger 891dae031c
Make default_port protocol specific. (#5563)
* [modes] make default_port protocol specific

* fix nits

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-09-07 12:14:48 +00:00
Maximilian Hils 51611be2dd
share `SSL.Context` for all client <-> proxy connections (#5340)
* share `SSL.Context` for all client connections

This should cause not functional differences, but increase performance.

* update tests
2022-09-07 13:57:27 +02:00
Maximilian Hils bfea2f27ce update test resources 2022-09-07 13:56:34 +02:00
Aldo Cortesi 704708dfef
[requires.io] dependency update on main branch (#5572)
* [requires.io] dependency update

* [requires.io] dependency update

Co-authored-by: requires.io <support@requires.io>
2022-09-07 13:44:19 +02:00
lauren 6494e97e78
render application/prpc as grpc protobuf (#5568) 2022-09-02 09:22:54 -05:00
Manuel Meitinger 1706a9b9fe
Unify proxy modes, introduce UDP protocol detection. (#5556)
* [modes] new unified syntax

* [modes] full coverage udp.py

* [modes] mypy and coverage

* [modes] split mode_spec into two files

* [modes] adjust DNS layer

* [modes] add udp layer decision

* [modes] use 1:1 ServerInstances

* [modes] fix paste issue

* [modes] update tests

* [modes] fix typo

* [modes] updated docs

* [modes] fix typo
2022-08-30 05:27:51 +02:00
Maximilian Hils 3865e6f8dd
Merge pull request #5555 from mhils/mitmweb-state
Mitmweb: Show Proxy State
2022-08-28 08:52:32 -05:00
Maximilian Hils 0ce20c55a2 fix web tests 2022-08-28 01:36:45 +02:00
Maximilian Hils 928094c916 improve signal handling 2022-08-27 19:22:38 +02:00
Maximilian Hils 0b7ad85377 [web] add capture setup screen 2022-08-25 21:38:49 +02:00
Maximilian Hils ee14373770 [web] add `/state` API endpoint
This endpoint will be used to communicate the mitmproxy server state that is
not part of flows/eventlog/options. As a first use case, we now transmit the
state of all proxy server instances.
2022-08-25 21:38:49 +02:00
Maximilian Hils d9b4ef1fee refactor `Servers.update` to retain order
`set()` does not guarantee order, which means the list of servers is not in sync with `options.modes`.
Also removed modes from signals - we readd them once we have a concrete use case.
Finally, we only try to start each server once. Retrying should be done by the UI.
2022-08-25 21:38:49 +02:00
Aldo Cortesi be77761310
[requires.io] dependency update on main branch (#5551)
* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* Update setup.py

Co-authored-by: requires.io <support@requires.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-08-24 11:56:44 +02:00
Joran van Apeldoorn cba66953a3
Magisk module onboarding for Android (#5547)
* Added magisk module generation

* Fixed typo

* changelog

* Fixed mypy bug

* Changed action based on ubuntu 18.04 due to https://bit.ly/3QOw87Z

* Workflow pinned to ubuntu 20.04

* Moved magisk code to utils and gen on download

* Styling

* Removed magisk from git repo

* Added tests

* Fixed dead line

* Update CHANGELOG.md

* Hardcoded hash

Co-authored-by: Joran van Apeldoorn <joran@bitsoffreedom.nl>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2022-08-23 14:52:11 +00:00
Maximilian Hils 269b23fca1
improve handling of port=0 (#5549) 2022-08-23 11:35:56 +02:00
Maximilian Hils 6ff5d0cc78 use correct option when determining TLS min/max versions, fix #5546 2022-08-22 15:19:18 +02:00
Maximilian Hils 6d6d2bcdb1
Merge pull request #5542 from mhils/os-proxy
Simplify transparent mode, fix listening on port 0
2022-08-21 23:58:33 +02:00
Maximilian Hils 40ac31da02 remove `GetSocket`, simplify transparent mode destination resolution 2022-08-21 23:52:39 +02:00
Aldo Cortesi 7911636a5c
[requires.io] dependency update on main branch (#5537)
* [requires.io] dependency update

* [requires.io] dependency update

* Update tox.ini

* Update setup.py

Co-authored-by: requires.io <support@requires.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-08-21 23:30:12 +02:00
Maximilian Hils c29a938cab port=0: use same port for IPv4 and IPv6 2022-08-18 15:52:52 +02:00
Maximilian Hils bc370276a1 flask: fix tests
Flask 2.2 has compatibility issues with pytest-asyncio (https://github.com/pallets/flask/issues/4773),
but it turns out we don't even need our tests to be async here. So we just use sync tests to fix the CI issues.
2022-08-17 18:56:04 +02:00
Maximilian Hils f4dc2f2cfd
Replace blinker with custom implementation (#5528)
* replace blinker with custom implementation

The major benefit here is type checking, followed by proper support for async receivers.

* fix compatibility with Python 3.9

* fix nits

* try harder to force gc

* try harderer

* coverage++

* coverage++

* nits
2022-08-16 12:21:55 +00:00
Maximilian Hils 5a0165fd2b
mitmweb: compress dump files (#5532) 2022-08-16 12:07:30 +00:00
Manuel Meitinger e11626395e
Fix running hook issue and signal proxyserver updates. (#5512)
* add startup hook

* remove StartupHook

* add instance state reports

* make server stop log entries clearer

* fix default param issue

* add SyncSignal and AsyncSignal

* fix signal issues

* simpler update handling

* fix coverage

* minor change to better reflect server update state

* fix reuse tests on linux/wsl

* exterminate `mitmproxy.exceptions.TypeError`

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-08-14 00:11:01 +02:00
juesexiangyang 51684e1e2d
Update mode_servers.py (#5526) 2022-08-11 20:45:50 +02:00
Manuel Meitinger fbcffee87f
Include server information in bind/listen errors. (#5495)
* include host and port in listen errors

* common UDP server and reuse message

* update tests

* fix reuse test for master
2022-08-02 19:00:34 +02:00
Manuel Meitinger 73c38f698d
update pyOpenSSL to version 22 (#5505) 2022-07-31 09:40:56 +02:00
Maximilian Hils 6cfde13b02
Merge pull request #5397 from kckeiks/add-dtls-support
Add dtls support
2022-07-29 19:10:33 +02:00
Maximilian Hils c3f238f9c8 use latest kaitai compiler 2022-07-29 19:03:30 +02:00
Miguel Guarniz f60af70d9d remove deleted file from excluded list
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:06 +02:00
Miguel Guarniz 30ddb1130f add DTLS ksy file
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:06 +02:00
Miguel Guarniz 05c8ce150e use valid port number in test
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:06 +02:00
Miguel Guarniz 5f93227685 update tests after merging DTLS into TLS
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:06 +02:00
Miguel Guarniz 544f60c1e6 merge DTLS layer into TLS layer
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:06 +02:00
Miguel Guarniz 0860cb1dda remove conflicts and fix lint errors
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:06 +02:00
Miguel Guarniz 9cb16c8f6d remove duplicate test
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29 19:02:05 +02:00