Repository navigation
feat(mitm): TPROXY capture-mode manager (decrypt 4a/N) - #4208
Merged
Merged
Conversation
Singleton lifecycle around the decrypt-capable transparent listener (#4200): builds the dynamic CA (#4173), gates on native-addon availability, holds the single running handle, counts interceptions, and exposes start / stop / status for a local-only route (4b) to drive. The OS trust-store mechanism is deliberately not baked in: installCa / uninstallCa are injected by the caller (the route / VPS e2e provides the real installer, which needs its own trust-store slot so it does not clobber the static MITM cert). The manager therefore never mutates the trust store itself and stays unit-testable without root or the native addon. - startCaptureMode: rejects when unavailable or already running; builds the CA; wires the injected installCa/uninstallCa through to the decrypt listener. - stopCaptureMode: stops the handle (close + uninstall CA + revert), idempotent. - getCaptureStatus: running / available / startedAt / interceptCount / onPort. Route + real trust-store installer + Traffic Inspector UI tab + VPS e2e-with-decrypt + addon prebuilds follow (4b+).
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jun 18, 2026
Merged
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…ence#4208) Singleton lifecycle around the decrypt-capable transparent listener (cheaper-inference#4200): builds the dynamic CA (cheaper-inference#4173), gates on native-addon availability, holds the single running handle, counts interceptions, and exposes start / stop / status for a local-only route (4b) to drive. The OS trust-store mechanism is deliberately not baked in: installCa / uninstallCa are injected by the caller (the route / VPS e2e provides the real installer, which needs its own trust-store slot so it does not clobber the static MITM cert). The manager therefore never mutates the trust store itself and stays unit-testable without root or the native addon. - startCaptureMode: rejects when unavailable or already running; builds the CA; wires the injected installCa/uninstallCa through to the decrypt listener. - stopCaptureMode: stops the handle (close + uninstall CA + revert), idempotent. - getCaptureStatus: running / available / startedAt / interceptCount / onPort. Route + real trust-store installer + Traffic Inspector UI tab + VPS e2e-with-decrypt + addon prebuilds follow (4b+).
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
Epic A / Fase 3 — decrypt 4a/N. A singleton lifecycle manager around the decrypt-capable transparent listener (#4200), so a local-only route (4b) can drive start / stop / status without re-deriving the orchestration.
src/mitm/tproxy/captureManager.ts:startCaptureMode— rejects when the native addon is unavailable or a session is already running; builds the dynamic CA (DynamicCertStore, feat(mitm): dynamic per-SNI cert authority for TPROXY (TLS decrypt 1/N) #4173); wires the injectedinstallCa/uninstallCathrough to the decrypt listener; counts interceptions viaonIntercept.stopCaptureMode— stops the running handle (which closes the listener, uninstalls the CA, and reverts the rules); idempotent no-op when nothing runs.getCaptureStatus—{ running, available, startedAt, interceptCount, onPort }.The manager never touches the OS trust store itself —
installCa/uninstallCaare injected. This is deliberate: the real Linux installer needs its own trust-store slot so it does not clobber the static MITM server cert (whichcert/install.ts::installCertpins to a fixedLINUX_CERT_NAME), and that mechanism is best validated on the VPS. It also keeps the manager unit-testable without root or the native addon.Test Plan
tests/unit/tproxy-capture-manager.test.ts(7/7) — all seams injected, no root/addon:installCa/uninstallCathrough to the decrypt listener (decrypt.installCa === installCa) and reportsrunning+onPort.already running).stop()and clears running state.onIntercept.Validation:
typecheck:core✓,lint✓ (0).🤖 Generated with Claude Code