Support watching child process traffic - #1877
Open
waldekmastykarz wants to merge 3 commits into
Open
waldekmastykarz wants to merge 3 commits into
waldekmastykarz wants to merge 3 commits into
Conversation
Add opt-in process-tree filtering that walks ancestor processes and caches decisions by PID and process start time. Closes dotnet#1800 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Address process-handle disposal and Windows PID-reuse ancestry validation issues.
Review effort: Lite
Findings: None
What changed in this PR
Adds opt-in process-tree traffic watching with cross-platform ancestry resolution and PID/start-time caching.
Changes:
- Adds
watchProcessTreeconfiguration and--watch-process-tree. - Updates runtime filtering, schema, documentation, and tests.
- Extends configuration contracts and test fakes.
| File | Reviewed changes |
|---|---|
skills/dev-proxy/references/configuration.md |
Documents process-tree watching. |
schemas/v4.0.0/rc.schema.json |
Adds schema support. |
DevProxy/Proxy/ProxyConfiguration.cs |
Adds configuration state. |
DevProxy/Commands/DevProxyCommand.cs |
Handles the CLI option. |
DevProxy.Tests/Fakes.cs |
Updates the test configuration fake. |
DevProxy.Proxy.Kestrel/KestrelProxyEngine.cs |
Passes tree settings to filtering. |
DevProxy.Proxy.Kestrel/Internal/ProcessFilter.cs |
Implements ancestry resolution, matching, and caching. |
DevProxy.Proxy.Kestrel.Tests/ProcessFilterTests.cs |
Adds process-filter tests. |
DevProxy.Integration.Tests/TestProxyConfiguration.cs |
Updates integration configuration. |
DevProxy.Abstractions/Proxy/IProxyConfiguration.cs |
Extends the configuration contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
garrytrinder
requested changes
Sep 21, 2026
garrytrinder
left a comment
Collaborator
There was a problem hiding this comment.
Requesting changes for the Windows ancestor PID-reuse issue. The process-handle disposal issue should also be addressed while touching this path.
Reject reused ancestor PIDs using process start times and dispose process handles after metadata lookup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| bool ValidateSchemas { get; } | ||
| IEnumerable<int> WatchPids { get; set; } | ||
| IEnumerable<string> WatchProcessNames { get; set; } | ||
| bool WatchProcessTree { get; set; } |
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
--watch-process-tree/watchProcessTreesupportCloses #1800
Validation
dotnet build DevProxy/DevProxy.csprojdotnet test DevProxy.Proxy.Kestrel.Tests/DevProxy.Proxy.Kestrel.Tests.csproj --no-restoredotnet test DevProxy.Tests/DevProxy.Tests.csproj--watch-process-tree