-
Notifications
You must be signed in to change notification settings - Fork 939
Refactor/egress mitmproxy yaml config #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hittyt
merged 9 commits into
opensandbox-group:main
from
Pangjiping:refactor/egress-mitmproxy-yaml-config
Jun 9, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3a364a1
refactor(egress): split mitmproxy config into yaml (static) vs env (d…
Pangjiping 8f1e7ae
docs(egress): document config.yaml override paths (downstream image, …
Pangjiping a90b629
chore(egress): symlink /egress to new binary path for backward compat…
Pangjiping 0071c94
docs(egress): resolve merge conflict in mitmproxy-transparent.md
Pangjiping 0331ef0
fix(egress): add connection_strategy=lazy to config.yaml
Pangjiping ab2cf7f
feat(egress): add SNI-aware ignore_hosts via tls_clienthello addon hook
Pangjiping 5131006
feat(egress): add OPENSANDBOX_EGRESS_MITMPROXY_CONFDIR to override co…
Pangjiping 6415422
Revert "feat(egress): add OPENSANDBOX_EGRESS_MITMPROXY_CONFDIR to ove…
Pangjiping 9082d78
fix(egress): revert stream_large_bodies to 1m
Pangjiping File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Static mitmproxy options that override mitm built-in defaults for the | ||
| # OpenSandbox egress sidecar. Loaded automatically by mitmdump from | ||
| # /var/lib/mitmproxy/.mitmproxy/config.yaml. | ||
| # | ||
| # Only deviations from mitm defaults are listed here. Options that | ||
| # happen to match the mitm default (http2=true, etc.) are intentionally | ||
| # omitted — the file is meant to be the diff against upstream defaults, | ||
| # not a full enumeration. Two intentional exceptions to this rule: | ||
| # ignore_hosts (kept as a discoverable extension point) and | ||
| # connection_strategy (mitmproxy 10+ changed the default from lazy to | ||
| # eager; we pin lazy explicitly to preserve the historical behavior). | ||
| # | ||
| # Per-deployment overrides remain env-driven and applied as --set by | ||
| # launch.go. Precedence: command-line --set > this file > mitm defaults. | ||
|
|
||
| mode: | ||
| - transparent | ||
|
|
||
| # mitm default changed from lazy to eager in mitmproxy 10+. We pin | ||
| # lazy explicitly: upstream connections are deferred until the full | ||
| # request arrives, avoiding unnecessary upstream opens for blocked | ||
| # or filtered requests. | ||
| connection_strategy: lazy | ||
|
|
||
| # mitm default 0.0.0.0; transparent mode must only accept loopback inside | ||
| # the netns (iptables REDIRECT pushes outbound traffic here, and exposing | ||
| # mitm on the LAN would route any inbound connection through it). | ||
| listen_host: 127.0.0.1 | ||
|
|
||
| # mitm default None (whole body buffered in memory). 1m bounds RSS for | ||
| # the allow path; chunked / SSE responses are forced to stream regardless | ||
| # by the system addon's responseheaders hook. | ||
| stream_large_bodies: 1m | ||
|
|
||
| # mitm default None (Python certifi bundle). Match the OS trust store so | ||
| # private-CA additions land where mitm reads them. | ||
| ssl_verify_upstream_trusted_confdir: /etc/ssl/certs | ||
|
|
||
| # Hosts (Python regex) for TLS pass-through: mitm forwards bytes without | ||
| # decryption and addons do not see request/response content. Empty matches | ||
| # the mitm default; kept here as a discoverable extension point. Append | ||
| # entries here rather than passing --set on the command line, because | ||
| # --set on a list option REPLACES the entire list. | ||
| ignore_hosts: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.