mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
mirror of https://github.com/vee1e/mitmproxy - An interactive TLS-capable intercepting HTTP proxy for penet
* fix(web): avoid infinite componentDidUpdate loop in FlowTable `FlowTable.componentDidUpdate` calls `this.onViewportUpdate()` on every update, even when the inputs to `calcVScroll` (the flow list and the row height) did not change. `onViewportUpdate` reads the current `viewport.scrollTop`, recomputes `vScroll`, and `setState`s when `state.viewportTop !== scrollTop` or `vScroll` shape changed. The new `state.viewportTop` is `Math.min(scrollTop, vScroll.end * rowHeight)`, so when `vScroll.end * rowHeight < scrollTop` the new state stays strictly below `scrollTop`, the inequality holds on the next iteration, and the cycle spins until the browser kills the JS thread. Gated the call on `prevProps.flowView !== this.props.flowView || prevProps.rowHeight !== this.props.rowHeight`. The other `onViewportUpdate` call sites — `componentDidMount`, the window resize listener, the viewport `onScroll` handler, and the post-scroll-into-view call — are unchanged, so user scrolling and resizing still drive the virtual-scroll window normally. Added a `FlowTableSpec.tsx` regression test that spies on `PureFlowTable.prototype.onViewportUpdate` and asserts it is NOT called after a `select` dispatch (which changes connect-mapped props but leaves `flowView` and `rowHeight` alone). The test fails without the fix. * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Maximilian Hils <git@maximilianhils.com> |
||
|---|---|---|
| .github | ||
| docs | ||
| examples | ||
| mitmproxy | ||
| release | ||
| test | ||
| web | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| codecov.yml | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.md | ||
| SECURITY.md | ||
| uv.lock | ||
mitmproxy
mitmproxy is an interactive, SSL/TLS-capable intercepting proxy with a console
interface for HTTP/1, HTTP/2, and WebSockets.
mitmdump is the command-line version of mitmproxy. Think tcpdump for HTTP.
mitmweb is a web-based interface for mitmproxy.
Installation
The installation instructions are here. If you want to install from source, see CONTRIBUTING.md.
Documentation & Help
General information, tutorials, and precompiled binaries can be found on the mitmproxy website.
The documentation for mitmproxy is available on our website:
If you have questions on how to use mitmproxy, please use GitHub Discussions!
Contributing
As an open source project, mitmproxy welcomes contributions of all forms.