To get started hacking on mitmproxy_rs, please install mitmproxy as described in the main mitmproxy repository and install the latest Rust release. Make sure that you have mitmproxy's virtualenv activated and run the following:
pip install maturin
git clone https://github.com/mitmproxy/mitmproxy_rs.git
cd mitmproxy_rs/mitmproxy-rs
maturin develop
mitmproxy now uses your locally-compiled version of mitmproxy_rs
. After applying any changes to the Rust code,
re-run maturin develop
and restart mitmproxy for changes to apply.
If you've followed the procedure above, you can run the basic test suite as follows:
cargo test --workspace
Please ensure that all patches are accompanied by matching changes in the test suite.
The format for Rust code is enforced by cargo fmt
.
Pull requests will be automatically fixed by CI.
The asynchronous runtime can be introspected using tokio-console
if the crate
was built with the tracing
feature:
tokio-console http://localhost:6669
There should be no task that is busy when the program is idle, i.e. there should be no busy waiting.
If you are the current maintainer of mitmproxy_rs, you can perform the following steps to ship a release:
- Make sure that...
- you are on the
main
branch with a clean working tree. cargo test
is passing without errors.
- you are on the
- Bump the version in
Cargo.toml
. - Run
cargo update --workspace
to update the lockfile with the new version. - Update
CHANGELOG.md
. - Commit the changes and tag them.
- Convention: Tag name is simply the version number, e.g.
1.0.1
.
- Convention: Tag name is simply the version number, e.g.
- Manually confirm the CI deploy step on GitHub.