Repository navigation
Proxy error hardening: 502/504 before commit, truncation integrity, quieter expected failures - #1083
Merged
Merged
Conversation
… breaker, log accuracy - Answer 502/504 on H1 origin failure before the client response is committed - Circuit breaker + decrypt bypass for clients that reject the MITM certificate - Timeout log names the configured limit; QUIC shutdown noise at Trace - Bridges map ProxyTimeoutException to 504 - Regression-2026-10-07 tests
…ts; stale root cleanup - H2->H1.1 bridge replays a bodiless idempotent request once on a fresh connection when a reused origin socket was closed - New roots carry SKI; leaves carry AKI only when the issuer has an SKI - Inspector: Remove old root CAs command (same-CN roots except the current one) - H3 origin session dispose and H2 relay origin-death regression tests (no defect reproduced) - Troubleshooting docs for 502/504 and client-reject bypass
…g the host in the URL column Showing since on every non-empty list made HH:mm ambiguous once a capture crossed midnight, so add the date when the oldest session is not from today. The previous commit also broke SessionPipelineTests, which still expected a bare Sessions: N, and added a redundant count refresh after Session retention. The URL column repeated the Host column. Show path and query instead (non-default port kept, CONNECT shows the port), with the full URL in the tooltip, Ctrl+C, sorting and search.
…s > Columns Add a column chooser (header right-click and Options > Columns) with Reset columns. New optional Started, Scheme and Content-Type columns are hidden by default; URL always stays visible. Visibility persists immediately in the saved grid layout, hiding the sorted column falls back to Id ascending, and the default grid is unchanged.
…tle, CONNECT 502 for opaque tunnels Replay of 100 rapid tabs + sanity browse after the earlier hardening showed the log was dominated by repeated stack traces for expected failures (9.6 MB, 6.3 MB of it 'Client session cancelled') and opaque tunnels still answered CONNECT 200 then silently closed on DNS/refusal. - ProxyDiagnostics: expected exceptions log one Debug summary line; the stack moves to Trace. ReportCaught applies the same rule. - Happy Eyeballs and 'connection setup FAILED' lines: summary at Debug. - ProxyLog.ClientHandshakeAborted: per-host 10 s throttle (bounded table). - ExplicitClientHandler: an opaque tunnel reuses the connection dialed for EstablishServerConnectionBeforeResponse instead of dialing twice. - Inspector: opaque tunnels dial before CONNECT 200 (browser shows ERR_TUNNEL_CONNECTION_FAILED with a 502 instead of a bare close). - Tests: Regression-2026-10-07 log-shape, throttle, opaque 502 and reuse. - Docs: troubleshooting (website + wiki).
… a filter The DataGrid resets its scroll offset when the session list is swapped for a filter change. That was read as the user scrolling away, which paused follow-latest and left the grid mid-list. Ignore scroll changes during a list swap and resume follow when the list is empty or fits on screen.
…sible A CONNECT target has no path, so the URL cell is empty (host:port stays in the tooltip) instead of a stray :443. Because URL shows only the path and Host shows the host, both columns are pinned in the column chooser. Host column default width is wider so long names do not run into the next column.
…n fast paths A short Content-Length read from the origin no longer rewrites the length to look complete: the fast paths keep the declared length and close the client connection, and the HTTP/2 bridge fails the exchange (502 or RST_STREAM). The H1 fast path and the HTTP/2 bridge now apply ResponseHeaderTimeoutSeconds and the per-session timeout, so a stalled origin yields a 504 instead of hanging. Adds origin-failure integration tests with a scripted TLS origin.
…ssion tests, document truncation
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Hardens proxy error handling found in a real Inspector session log (browser-visible protocol errors and log noise).
Tests
Regression-2026-10-07 tests for each error type: origin-failure matrix, bridge 504/502/RST/replay, H3+TCP dead (bounded 502, capability evicted), ALPN rejected, stale-root predicate and cleanup command.
Full suites: Unit 3 failures, Integration 3 failures (all environmental: chain-building error x2 and
Nested_Proxy_Farm...which also fails on the base commit; one timing flake passes in isolation x5). Inspector, CLI, Configuration suites green.Performance
Counterbalanced paired A/B vs base (
mitm-http2-to-http1,https-mitm,reverse-http1-mitm, c=64): within noise, no RSS delta. New checks on the hot path are config comparisons only; the one new loop check inCopyBytesToStreamis a single compare after the loop.