Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
protobuf:
runs-on: macos-latest
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
# FIXME: https://github.com/mitmproxy/mitmproxy/issues/7877 - bump SwiftProtobuf and then re-add this here.
# - run: brew install swift-protobuf
- run: brew install protobuf
Expand All @@ -39,7 +39,7 @@ jobs:
- os: macos-latest
- os: ubuntu-latest
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
with:
rust-version: ${{ env.MSRV }}
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
env:
RUSTFLAGS: ${{ matrix.rust == 'nightly' && '-Zpanic_abort_tests -C panic=abort' || '' }}
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
with:
rust-version: ${{ matrix.rust }}
Expand Down Expand Up @@ -84,17 +84,17 @@ jobs:
runs-on: ${{ matrix.os }}
name: build mitmproxy-rs (${{ matrix.name }})
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
with:
extra-targets: ${{ matrix.target }}

- if: runner.os == 'Linux'
name: Install maturin[zig] from PyPI
uses: install-pinned/maturin-with-zig@7f54e6144d8fd17188d0e99742fefc4bcb178e06
uses: install-pinned/maturin-with-zig@b10cdafc5d601c9f081acd683e4d9e2cb3538528
- if: runner.os != 'Linux'
name: Install maturin from PyPI
uses: install-pinned/maturin@3bfd83cd34bdcbcc8a10e459c2a9e41e6c33e706
uses: install-pinned/maturin@499d31ac84c34c8a405f267c9cb60fa7d5592e62

- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: python .github/scripts/pin-versions.py
Expand All @@ -115,7 +115,7 @@ jobs:
build-macos-app:
runs-on: macos-latest
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- if: ${{ !startsWith(github.ref, 'refs/tags/') }} # harden against cache poisoning
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
id: cache-app
Expand All @@ -141,9 +141,9 @@ jobs:
runs-on: windows-latest
name: build mitmproxy-windows
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
- uses: install-pinned/build@80919007c59a8977ba4eedf1f3234e73f674aa2e
- uses: install-pinned/build@9ff7470d36ff1790990e7c6f16201bc35bfe9a73

- run: cargo build --release --package windows-redirector

Expand All @@ -158,11 +158,11 @@ jobs:
needs: build-macos-app
runs-on: macos-latest
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
with:
extra-targets: aarch64-apple-darwin x86_64-apple-darwin
- uses: install-pinned/build@80919007c59a8977ba4eedf1f3234e73f674aa2e
- uses: install-pinned/build@9ff7470d36ff1790990e7c6f16201bc35bfe9a73

- run: |
cargo build --release --package macos-certificate-truster --target x86_64-apple-darwin
Expand Down Expand Up @@ -192,10 +192,10 @@ jobs:
args: --compatibility manylinux2014 --zig
runs-on: ${{ matrix.os }}
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
- name: Install maturin[zig] from PyPI
uses: install-pinned/maturin-with-zig@7f54e6144d8fd17188d0e99742fefc4bcb178e06
uses: install-pinned/maturin-with-zig@b10cdafc5d601c9f081acd683e4d9e2cb3538528
- run: maturin build --release ${{ matrix.args }}
working-directory: ./mitmproxy-linux
- run: test -f target/wheels/*-py3-none-*.whl # ensure we have a universal wheel
Expand All @@ -209,7 +209,7 @@ jobs:
needs: build-linux-wheel
runs-on: ubuntu-latest
steps:
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
Expand All @@ -226,12 +226,12 @@ jobs:
- build-windows-wheel
- build-linux-wheel
- build-macos-wheel
uses: mhils/workflows/.github/workflows/alls-green.yml@e6b54c0368640a2201137f00272b978b51d26268
uses: mhils/workflows/.github/workflows/alls-green.yml@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
with:
jobs: ${{ toJSON(needs) }}

deploy:
uses: mhils/workflows/.github/workflows/python-deploy.yml@e6b54c0368640a2201137f00272b978b51d26268
uses: mhils/workflows/.github/workflows/python-deploy.yml@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
needs: check
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
runs-on: ubuntu-latest
steps:
# TODO: This should ideally just reuse the main CI artifacts.
- uses: mhils/workflows/checkout@e6b54c0368640a2201137f00272b978b51d26268
- uses: mhils/workflows/checkout@589b2878317d2d57c315c5825f9a1cfe9c76a7c3
- uses: ./.github/actions/setup
- uses: install-pinned/maturin-with-zig@7f54e6144d8fd17188d0e99742fefc4bcb178e06
- uses: install-pinned/mypy@75779f141592e4909d64e13f8a1861f06aa9cd8d
- uses: install-pinned/pdoc@69ba59f9699df21e1026110af4ec6b10a98cf5cd
- uses: install-pinned/maturin-with-zig@b10cdafc5d601c9f081acd683e4d9e2cb3538528
- uses: install-pinned/mypy@ca797a92cfcf502e7c9f5d37f8d2d276778d2774
- uses: install-pinned/pdoc@f06d2d4ffa04927fd830d36f5bafba15f02f3932

- run: maturin build --features docs,pyo3/extension-module
working-directory: ./mitmproxy-rs
Expand Down Expand Up @@ -52,4 +52,4 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5
5 changes: 4 additions & 1 deletion mitmproxy-rs/mitmproxy_rs/contentviews.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import annotations

from typing import ClassVar, final, Literal
from typing_extensions import disjoint_base

class Contentview:

@disjoint_base
class Contentview: # typing: ignore
name: ClassVar[str]

syntax_highlight: ClassVar[Literal["xml", "yaml", "none", "error"]]
Expand Down
8 changes: 4 additions & 4 deletions mitmproxy-rs/mitmproxy_rs/dns.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from __future__ import annotations
from typing import final
from typing import Self, final

@final
class DnsResolver:
def __init__(
self, *, name_servers: list[str] | None = None, use_hosts_file: bool = True
) -> None: ...
def __new__(
cls, *, name_servers: list[str] | None = None, use_hosts_file: bool = True
) -> Self: ...
async def lookup_ip(self, host: str) -> list[str]: ...
async def lookup_ipv4(self, host: str) -> list[str]: ...
async def lookup_ipv6(self, host: str) -> list[str]: ...
Expand Down
1 change: 0 additions & 1 deletion mitmproxy-rs/stubtest-allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ mitmproxy_rs._pyinstaller.hook-mitmproxy_windows
mitmproxy_rs._pyinstaller.hook-mitmproxy_macos
mitmproxy_rs._pyinstaller.hook-mitmproxy_linux
mitmproxy_rs.T
mitmproxy_rs.dns.DnsResolver.__init__
Loading