Skip to content

Instantly share code, notes, and snippets.

@tjclement
Created January 8, 2016 20:08
Show Gist options
  • Save tjclement/928c3865d3d3a7ed579c to your computer and use it in GitHub Desktop.
Save tjclement/928c3865d3d3a7ed579c to your computer and use it in GitHub Desktop.
A regression repro for Electron v0.34.1 and above ignoring proxy settings
var app = require('app');
var BrowserWindow = require('browser-window');
require('crash-reporter').start();
var mainWindow = null;
app.on('window-all-closed', function () {
if (process.platform != 'darwin') {
app.quit();
}
});
app.on('ready', function () {
mainWindow = new BrowserWindow({width: 1024, height: 768});
mainWindow.webContents.session.setProxy('socks5://23.28.195.172:10200', function () {
mainWindow.loadUrl('http://whatismyipaddress.com');
});
mainWindow.on('closed', function () {
mainWindow = null;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment