Skip to content

feat(egress): support multiple user mitm addon scripts#1126

Merged
hittyt merged 1 commit into
mainfrom
feat/egress-multi-mitm-scripts
Jun 27, 2026
Merged

feat(egress): support multiple user mitm addon scripts#1126
hittyt merged 1 commit into
mainfrom
feat/egress-multi-mitm-scripts

Conversation

@Pangjiping

Copy link
Copy Markdown
Collaborator

Summary

  • OPENSANDBOX_EGRESS_MITMPROXY_SCRIPT now accepts comma-separated paths (e.g. /a.py,/b.py), each passed as a separate -s flag to mitmdump after the system addon
  • Config.ScriptPath stringScriptPaths []string,extract buildMitmdumpArgs() for testability
  • Add parseScriptPaths() for comma-separated env parsing, 4 unit tests covering single/multiple/empty cases
  • Fully backward compatible — single path and empty value still work as before

Test plan

  • Unit tests pass: go test ./components/egress/pkg/mitmproxy/...
  • Verify single script env value still works (backward compat)
  • Verify comma-separated value loads multiple addons in order
  • Verify empty/whitespace-only entries are skipped
  • Server-side env passthrough unaffected (no parsing on server side)

🤖 Generated with Claude Code

…rated env

OPENSANDBOX_EGRESS_MITMPROXY_SCRIPT now accepts comma-separated paths
(e.g. "/a.py,/b.py"), each passed as a separate `-s` flag to mitmdump
after the system addon. Single-path usage remains unchanged.

- Config.ScriptPath string → ScriptPaths []string
- Extract buildMitmdumpArgs() for testability
- Add parseScriptPaths() for comma-separated env parsing
- Add 4 unit tests covering single, multiple, and empty/whitespace cases
- Update docs and comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Pangjiping Pangjiping added feature New feature or request component/egress labels Jun 25, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e675ef2536

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread components/egress/docs/mitmproxy-transparent.md

@ninan-nn ninan-nn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hittyt hittyt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hittyt hittyt merged commit be554a6 into main Jun 27, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/egress feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants