Unable to configure working Proxy

Hello everyone,

I’m struggling to solve an issue regarding the correct configuration of Electron proxy. I already asked this question on stackoverflow so here is the link.

Long story short, I’m failing to setup proxy using this:

  pacScript: url.format({
    pathname: path.join(__dirname, 'proxy.pac'),
    protocol: 'file:',
    slashes: true,

function FindProxyForURL(url, host) {
  if (shExpMatch(host, '*services-dynamic*')) {
    return 'PROXY';

  return 'DIRECT';

Any idea what I’m doing wrong?

I forgot, I’m using electron 6.0.7