mitmproxy / mitmproxy/mitmproxy

Add support to Sequence[int] similar to Sequence[str] for addon commands

Open
#6,660 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Python
Stars
45.1k
Forks
4.7k
Avg merge
21h 12m
Merged PRs (30d)
16

Description

Problem Description

Addon commands can be sequences, but the only supported sequence is of type str. Add support for Sequence[int].
https://github.com/mitmproxy/mitmproxy/blob/1f2e1a254a68e54e60360b66762ed6bdf2ff26be/docs/src/content/addons-commands.md?plain=1#L120
https://github.com/mitmproxy/mitmproxy/blob/1f2e1a254a68e54e60360b66762ed6bdf2ff26be/mitmproxy/optmanager.py#L368

Additional context

Example use case: passing multiple status codes.
https://github.com/realgam3/pymultitor/pull/38

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mitmproxy/optmanager.py around line 368 and compare the existing Sequence[str] handling with the addon command documentation at docs/src/content/addons-commands.md around line 120. Confirm how addon commands currently process sequences, then add equivalent support for Sequence[int] and update the documentation; passing multiple status codes should work as the completion check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.