Commit Graph

9199 Commits

Author SHA1 Message Date
Maximilian Hils
b8f79ed624
fix #4473 (#4490) 2021-03-10 19:54:54 +00:00
Maximilian Hils
a00f247f0e
fix #4487 (#4488) 2021-03-09 16:55:13 +00:00
Maximilian Hils
6d9f00408c
remove old socks proxy code (#4485) 2021-03-08 16:21:40 +00:00
Peter Dave Hello
c3ae2d98db
Refactor docs clirecording Dockerfile (#4484)
* Delete apt-get lists after apt-get install in docs Dockerfile

* Prevent pip install cache in docs Dockerfile

* Prevent additional & unnecessary apt packages in docs Dockerfile
2021-03-08 17:18:39 +01:00
Maximilian Hils
c40bc2fc2a
Merge pull request #4481 from mhils/minor-fixes
Minor fixes
2021-03-07 22:47:04 +01:00
Maximilian Hils
7345daf3f4
[sans-io] Add SOCKS5 proxy mode (#4482)
* [sans-io] add SOCKS5 proxy mode

* fixup coverage
2021-03-07 22:37:50 +01:00
Maximilian Hils
e2772f3eec fixup coverage 2021-03-07 22:35:53 +01:00
Maximilian Hils
d6cd1489d6 [sans-io] add SOCKS5 proxy mode 2021-03-07 22:19:03 +01:00
Maximilian Hils
47982cac10 run most common tests only when invoking tox without args.
envlist never really included the full list of environments,
for example cibuild was already missing. This commit tries to
make a reasonable tradeoff between comprehensiveness and local running time
by only running the most frequent error sources.

We still check everything in CI.
2021-03-07 16:17:40 +01:00
Maximilian Hils
1e793ced24 prepare #4470 2021-03-07 16:17:15 +01:00
Maximilian Hils
93de96a720
don't set IP addresses as SNI (#4480) 2021-03-07 15:00:33 +00:00
Thomas Kriechbaumer
42a1345daf
Merge pull request #4478 from Prinzhorn/flow_details_four
document flow_details 4
2021-03-05 23:10:38 +01:00
Alexander Prinzhorn
317ae115c2 document flow_details 4 2021-03-05 11:57:06 +01:00
Thomas Kriechbaumer
8178f6c77b
Merge pull request #4474 from PeterDaveHello/improve-docs-dockerfile
Speed up `git clone` in docs Dockerfile
2021-03-04 22:45:11 +01:00
Peter Dave Hello
d0e4a82de8 Speed up git clone in docs Dockerfile 2021-03-03 15:56:23 +08:00
Maximilian Hils
4bd7b6c4ea
speculative HTTP/2 fixes, refs #4451 (#4464) 2021-02-21 15:36:04 +01:00
Maximilian Hils
593dd93cf8
HTTP/2: Show human-readable error messages (#4462) 2021-02-20 12:49:21 +01:00
Maximilian Hils
001cf6c10a
memleak: immediately store errored flows, refs #4456 (#4461) 2021-02-19 21:23:42 +00:00
Maximilian Hils
cfaba15c1f
fix regression introduced in 70e08c880 (#4459) 2021-02-19 18:34:52 +00:00
Maximilian Hils
70e08c880c
don't reuse closed connections, refs #4451 (#4458) 2021-02-18 22:07:18 +00:00
Maximilian Hils
ff4120d4f3
don't call set_alpn_protos if ALPNs are empty, refs pyca/pyopenssl#992 (#4457) 2021-02-17 18:38:12 +01:00
Maximilian Hils
c8eca9a396
fix #4452 (#4454) 2021-02-16 16:38:08 +00:00
Daniel Baskal
aebc40c408
Fixes #4416 (#4446)
* Fixes #4416

Fix ValueError when splitting on a request URI without a path part.

* Fix mypy lintining issue

* Replace .split() with .partition() for cleaner code
2021-02-14 18:19:00 +01:00
Maximilian Hils
9763c1810d
Merge pull request #4444 from mhils/docs-ci
Fix Docs CI
2021-02-13 12:34:50 +01:00
Maximilian Hils
b5d9dcdeee fix docs CI 2021-02-13 12:29:52 +01:00
Maximilian Hils
d2c9efc98f CI: fail when docs fail to build 2021-02-13 12:26:44 +01:00
Maximilian Hils
748fc93699
Merge pull request #4422 from mhils/pdoc
Docs: Add API Reference Using Pdoc
2021-02-13 00:18:49 +01:00
Maximilian Hils
805aed4f6a docs++ 2021-02-13 00:13:37 +01:00
Anatoli Babenia
cff98a30e2
Fix HAR dump (#4439)
* Fix `KeyError: 'Unknown options: hardump'` in HAR test_simple

The reason was an invalid import of `connections` which is gone
in d159897d98, but the loading error
was silently ignored (#4438) resulting in a misleading exception
at a later stage.

This still doesn't make the test suite run, because it is better
to fix one error at a time.

The way to run tests from examples.

    ln -sr test/conftest.py examples
    pytest examples/contrib/test_har_dump.py -k simpl

The way to see the execution flow with silenced exceptions.

    from hunter import trace, Q
    trace(Q(stdlib=False), ~Q(filename_contains='site-packages'))

* Fix `TypeError: invoke() takes 3 positional arguments but 4 were given`

* Fix `TypeError: 'bool' object is not callable`
2021-02-11 21:07:09 +01:00
Denis Kasak
856a35af6d
Use original flow host instead of IP when exporting to curl/httpie. (#4307)
Use original flow host instead of IP when exporting to curl/httpie.

Unless this is done, the SNI server name will not be sent, often making
the curl/httpie command have different behaviour than the original
request (most often in the form of failing to establish a TLS
connection).

With this change, we always use the original host, fixing this failure.
However, if the original host is a domain, it may sometimes resolve to
a different IP address later on. In curl, we solve this problem by
forcing it to connect to the original IP using `--resolve`. For httpie
there is currently no easy solution (see:
https://github.com/httpie/httpie/issues/414).
2021-02-09 18:44:46 +00:00
Alexander Prinzhorn
4212a56f25
Collect all flow filter matches before modifying headers, fixes #4245 (#4246) 2021-02-09 19:37:46 +01:00
Siddharth Balyan
2e3d481544
Merge pull request #4435 from alt-glitch/master
Issue 4390: Using xdg-open to open default browser
2021-02-09 12:39:14 +01:00
Maximilian Hils
08d1f67e5b
[requires.io] dependency update on master branch (#4431)
Co-authored-by: requires.io <support@requires.io>
2021-02-08 16:46:57 +00:00
Maximilian Hils
0ab59e5524 docs++ 2021-02-05 22:04:45 +01:00
Maximilian Hils
51193f1d20 api docs++ 2021-02-05 09:15:54 +01:00
Maximilian Hils
a7d1f32c89 docs: first prototype to link from events to API reference 2021-02-05 09:15:54 +01:00
Maximilian Hils
09beb1aa13 docs: add api reference using pdoc 2021-02-05 09:15:54 +01:00
Maximilian Hils
bc3f39a202
Merge pull request #4427 from mhils/reorg
Improve module structure
2021-02-05 08:59:34 +01:00
Maximilian Hils
ca578181e3 adjust tests, increase coverage 2021-02-05 08:44:17 +01:00
Maximilian Hils
afd00785c8 docs: flow.Error 2021-02-05 08:44:17 +01:00
Maximilian Hils
dc6c5f55cd move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
Maximilian Hils
d68c364b35 inline/move http.make_* functions 2021-02-05 08:43:15 +01:00
Maximilian Hils
9409bf0368 move Headers/Message/Request/Response into mitmproxy.http 2021-02-05 08:43:15 +01:00
Maximilian Hils
a69ef1ec95
Merge pull request #4428 from sanlengjingvv/develop
Imporove document, pip install -e .[dev] error in mac zsh
2021-02-05 08:42:08 +01:00
sanlengjingvv
76d4c80df1 Imporove document, pip install -e .[dev] error in mac zsh 2021-02-05 11:11:23 +08:00
Maximilian Hils
c5bd7b1ae1
Merge pull request #4426 from mhils/mypy
update mypy
2021-02-04 03:36:25 +01:00
Maximilian Hils
990116b44a update mypy 2021-02-03 23:03:49 +01:00
Maximilian Hils
50ae75aedf
Merge pull request #4413 from r00t-/compat_convert_fix
fix conversion of old flows failing due to missing array keys
2021-02-03 19:54:24 +01:00
Maximilian Hils
bd0e5989e2 add websocket flow conversion test 2021-02-03 19:27:15 +01:00
Maximilian Hils
faeb9678f1 test dumpfiles: .bin -> .mitm 2021-02-03 19:27:15 +01:00