mitmproxy/setup.cfg
Fabio Valentini 2d495c093c
add transparent server mode based on WireGuard (#5562)
* add mode spec for WireGuard mode

* add WireGuard server implementation

* remove coverage excludes

* simplify wireguard spec

* lint!

* remove superfluous tests

* bump to mitmproxy_wireguard 0.1.1

* proxy/test_mode_specs: remove unused import

* fix wireguard server mode

* WireGuard: move keyfile gen into `.start()`

This way any file format errors result in `.last_exception` being set.

* fixup UDP support

* bump to mitmproxy_wireguard v0.1.2

This release fixes TCP connections which were broken in v0.1.1.

* fix crash handler

* add simple test for WireGuard server instances

* bump to mitmproxy_wireguard v0.1.5 and fix launching wg-test-client

* fixups

 - monkeypatch `handle_client` instead of the handlers.
 - fix OS detection
 - ctx.log -> logging

* nits

* bump to mitmproxy_wireguard 0.1.6 for fixed test client

* move WireGuardDatagramTransport into dedicated module

this allows us to exclude it from individual coverage, which makes no sense.
Also improve type checking to make sure that it's a full replacement.

* cover WireGuardServerInstance.is_running property with tests

* enable specialized server instance creation

* test wireguard conf generation

* deduplicate tcp/udp handlers

* update CHANGELOG

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-09-18 17:15:15 +02:00

80 lines
1.8 KiB
INI

[flake8]
max-line-length = 140
max-complexity = 25
ignore = E203,E251,E252,C901,W292,W503,W504,W605,E722,E741,E126,F541
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*,release/build/*
addons = file,open,basestring,xrange,unicode,long,cmp
[tool:pytest]
asyncio_mode = auto
testpaths = test
addopts = --capture=no --color=yes
filterwarnings =
ignore::DeprecationWarning:tornado.*:
[coverage:run]
branch = False
omit = *contrib*, *tnetstring*, *platform*, *main.py
[coverage:report]
show_missing = True
exclude_lines =
pragma: no cover
raise NotImplementedError
raise AssertionError
if typing.TYPE_CHECKING:
if TYPE_CHECKING:
@overload
@abstractmethod
\.\.\.
[mypy]
ignore_missing_imports = True
files = mitmproxy,examples/addons,release
[mypy-mitmproxy.contrib.*]
ignore_errors = True
[mypy-tornado.*]
ignore_errors = True
[mypy-test.*]
ignore_errors = True
# https://github.com/python/mypy/issues/3004
[mypy-http-modify-form,http-trailers]
ignore_errors = True
[tool:full_coverage]
exclude =
mitmproxy/tools/
release/hooks
[tool:individual_coverage]
exclude =
mitmproxy/addons/onboarding.py
mitmproxy/connections.py
mitmproxy/contentviews/base.py
mitmproxy/contentviews/grpc.py
mitmproxy/contentviews/http3.py
mitmproxy/ctx.py
mitmproxy/exceptions.py
mitmproxy/flow.py
mitmproxy/io/io.py
mitmproxy/io/tnetstring.py
mitmproxy/log.py
mitmproxy/master.py
mitmproxy/net/check.py
mitmproxy/net/http/cookies.py
mitmproxy/net/http/message.py
mitmproxy/net/http/multipart.py
mitmproxy/net/tls.py
mitmproxy/net/udp_wireguard.py
mitmproxy/options.py
mitmproxy/proxy/config.py
mitmproxy/proxy/server.py
mitmproxy/proxy/layers/tls.py
mitmproxy/utils/bits.py
mitmproxy/utils/vt_codes.py
mitmproxy/utils/pyinstaller