I am writing a desktop application on windows with an electron. Now I need to use the System global proxy setting as my own proxy, using a query to get some data like this
request({ url: "http://ahdas.drnh.gov.tw/index.php", method: "POST", proxy: this.proxyRequestUrl, headers: { "User-Agent": this.mainWindow.webContents.session.getUserAgent(), "Accept": "application/json, text/javascript, */*; q=0.01", "Accept-Encoding": "gzip, deflate", "Cookie": cookies }, form: {'act': 'Display/built/' + bookKey + "/" + postPageKey} }, (err, response, body) => { });
So, how can I get the global proxy settings of the system and assign this to this.proxyRequestUrl?
source share