Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

281
Visualizações
electron: How to set the proxy of the child window

I try to loadurl https://www.google.com and always get an error electron: Failed to load URL: https://www.google.com/ with error: ERR_PROXY_CONNECTION_FAILED . This problem has been bothering me for a week and I hope I can get your help

    newWin = new BrowserWindow({
        width: 400,
        height: 600,
        frame: true,
        maximizable: true,
        webPreferences: {
            devTools: true,
            webviewTag: true,
            nodeIntegration: true,
            enableRemoteModule: true,
            contextIsolation: false,
            preload: link
        },
    });
    
    newWin.index = arg.index;
    newWin.type = arg.type;
    
    //I have set ip and port here
    newWin.webContents.session.setProxy({
        proxyRules: "http://129.226.148.192:3128",
    }).then(() => {
        newWin.loadURL(`${arg.href}`);
    }).catch((err) => console.error(err));
    
    // I have configured the proxy account and password when I am here (login)
    newWin.on('login', (event, webContents, details, authInfo, callback) => {
        event.preventDefault();
        if (authInfo.isProxy) {
            callback('sub_1kni3wjb4g9i6pkhmbsz5qzd', 'stat900')
        }
    });

If anyone knows how to answer it would be greatly appreciated.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda