How to set electron setproxy(http)

enter code here
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 set the proxy to foreign here
newWin.webContents.session.setProxy({
    proxyRules: "http://129.226.148.192:3128",
}).then(() => {
    newWin.loadURL(`${arg.href}`);
}).catch((err) => console.error(err));

//Proxy login is done here 
newWin.on('login', (event, webContents, details, authInfo, callback) => {
    event.preventDefault();
    if (authInfo.isProxy) {
        callback('sub_1kni3wjb4g9i6pkhmbsz5qzd', 'stat900')
    }
});