Files
insomnia/packages
yaoweiprc aff48ee919 fix: propagate system proxy settings to user requests (INS-2943) (#10228)
* fix: propagate system proxy settings to user requests (INS-2943)

When proxyEnabled is false in Insomnia Preferences, the request engine
(node-libcurl) now falls back to the OS system proxy via Electron's
session.defaultSession.resolveProxy(), matching the behavior of
Insomnia's internal API calls.

Previously, disabling the proxy toggle explicitly set CURLOPT_PROXY to
an empty string, which prevented libcurl from using any proxy including
the system proxy. This caused user requests to bypass the OS proxy while
Insomnia's own network calls (via Chromium's network stack) correctly
respected it.

Changes:
- Add parseResolvedProxy() helper to parse PAC-format proxy strings
- Call resolveProxy() inside createConfiguredCurlInstance() when proxy
  is not explicitly configured
- Refactor api.protocol.ts to use the shared helper (removes ~50 lines
  of duplicated proxy parsing logic)

* fix: catch resolveProxy errors and fall back to direct connection

* fix: catch resolveProxy errors in api.protocol.ts

* fix: remove redundant comment about proxy mode in updateProxy function
2026-07-09 10:11:01 +00:00
..