Window.fetch not following system network configuration


#1

Hi!

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 ?

Thx,
tex0l.


#2

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 electron.net in the main process for network requests and IPC to pass data back and forth between main and renderer.


#3

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