Skip to content

Fix stuck system proxy cleanup after VPN traffic drops offline#59

Open
FaustUser wants to merge 1 commit intocoolcoala:mainfrom
FaustUser:fix/vpn-stuck-offline-cleanup
Open

Fix stuck system proxy cleanup after VPN traffic drops offline#59
FaustUser wants to merge 1 commit intocoolcoala:mainfrom
FaustUser:fix/vpn-stuck-offline-cleanup

Conversation

@FaustUser
Copy link

What changed
This PR fixes a failure mode where the app could show VPN/proxy as disconnected in the UI, but the OS proxy settings remained active after the actual VPN traffic path had already broken.
The change updates src/main/sys/sysproxy.ts so that:

  • proxy disable always runs immediately, even when electron.net.isOnline() reports offline;
  • any pending delayed retry timer is cleared before applying a new proxy action.

Why
Previously, triggerSysProxy(false, ...) was gated by net.isOnline(). In the broken-VPN scenario, the app could already consider the network offline, so disabling the VPN/proxy from the UI did not actually clear the system proxy. As a result, traffic kept going to an invalid local proxy endpoint and internet access did not recover until a reboot.

Result
After this fix, turning VPN/proxy off performs cleanup deterministically even in degraded/offline states, which prevents the app from leaving the system in a stuck no-internet state.

Validation

  • Ran npm run typecheck
  • TypeScript checks passed successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant