Skip to content

Fix case-insensitive allowlist matching and enforce lazy mitmproxy startup#36

Merged
jimpudar merged 1 commit into
mainfrom
jmp/fix-mitmproxy-addon-bugs
May 15, 2026
Merged

Fix case-insensitive allowlist matching and enforce lazy mitmproxy startup#36
jimpudar merged 1 commit into
mainfrom
jmp/fix-mitmproxy-addon-bugs

Conversation

@jimpudar
Copy link
Copy Markdown
Collaborator

@jimpudar jimpudar commented May 15, 2026

Summary

  • Normalize HTTPS and SSH allowlist entries and hostnames to lowercase so hostname matching is case-insensitive in the mitmproxy addon.
  • Add a runtime guard that rejects any mitmproxy startup or option change unless connection_strategy=lazy, preventing the TLS deny path from failing open.
  • Add focused unit tests for allowlist normalization, matcher behavior, and the connection strategy guard.

Testing

  • python3 -m unittest proxy.test_mitmproxy_addon proxy.test_agent_spy proxy.test_agent_spy_tui
  • py_compile validation for the addon and its tests passed with the bytecode cache redirected to a writable temp directory.
  • git diff --check passed.
  • bun test was not fully runnable in this workspace because local dependencies are missing (yargs/yargs).

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@jimpudar jimpudar merged commit 5e249db into main May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant