How connect to proxy in electron webview?

前端 未结 2 1195
南笙
南笙 2021-02-01 10:46

as I can connect through a to a free proxy server (or pay), currently in use as electron JS solution as desktop application

example proxy list servers

http://pr

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 11:26

    I had issues with suggested method in my context where I run separate browser views.

    Instead of setting proxy on BrowserWindow I set proxy on the view:

    view.webContents.session
          .setProxy({
            proxyRules: proxyString,
          })
    

    then using app.on('login') handler to authorize proxy.

提交回复
热议问题