You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d8c819
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Restore system proxy after a crashed instance (#1756)
* Restore system proxy after a crashed instance
When a detached instance running as system proxy is terminated uncleanly,
the OS proxy was left pointing at a dead port and 'devproxy stop --force'
could not recover it: StateManager prunes state files for dead PIDs before
the stop command reads them, so no instance was found and the system proxy
was never disabled.
Reconcile orphaned system-proxy registrations independently of finding a
live instance:
- Add StateManager.GetOrphanedSystemProxyStatesAsync (reads records for dead
PIDs with asSystemProxy=true without pruning them first).
- Add cross-platform, idempotent SystemProxyManager.Disable (Windows WinINET
via ProxyServer.DisableAllSystemProxies, macOS toggle-proxy.sh off) and
ReconcileOrphanedSystemProxiesAsync, guarded so the OS proxy is only
disabled when no live instance still owns it.
- devproxy stop / stop --pid now restore the system proxy for crashed
instances; self-heal also runs at startup (detached launcher and
ProxyEngine) so a stale registration doesn't linger across runs.
Refs #1731. PID-reuse hardening tracked in #1755.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0b22cd4a-15a3-4a8c-8248-fe776339aa45
* Address PR review feedback
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f2633a32-e727-4e47-93b9-76d9aeae01d6
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Garry Trinder <garry@trinder365.co.uk>
?$"Recovered system proxy left by a crashed Dev Proxy instance (PID: {orphan.Pid})."
63
+
:$"Removed stale system-proxy registration left by a crashed Dev Proxy instance (PID: {orphan.Pid}) while keeping the current system proxy owner unchanged.";
0 commit comments