Window.fetch not following system network configuration



I’m building an electron app which makes HTTP/S from a BrowserWindow with the window.fetch API.

I’m trying to make my app compatible with proxies (HTTP, HTTPS, SOCKS, authenticated or not, etc.), since Chromium follows the proxy configuration of the system, I’ve tried setting up the proxy there (on Win7).

I’ve tested the proxy configuration with Google Chrome: it goes through the proxy loading a webpage (the proxy server logs the requests and the chrome://net-internals/#events weppage shows them as well).

Then, I tried to use fetch in my electron BrowserWindow, and fetch requests didn’t go through the proxy… After that, I tested window.fetch in Google Chrome console, and actually fetch requests don’t go through the proxy !!!

I believe I’m missing something, since I’ve not found any closely related bug… Anyone has an idea ?



This comes just about a year late, but I can confirm I had the same issue. For future searches, the work around I came up with for this wasn’t pretty but effective. I’m using in the main process for network requests and IPC to pass data back and forth between main and renderer.


I have come up with two solutions as well to work around this issue: