Replies: 1 comment
-
After days of searching around on every search engine, I found the fix 2 hours after I ask for help.
//webrtc.js
function setWebRTCBlockingPolicy(webContents) {
webContents.setWebRTCIPHandlingPolicy('disable_non_proxied_udp'); // This will prevent both local and public IP from leaking.
}
module.exports = { setWebRTCBlockingPolicy };
const { setWebRTCBlockingPolicy } = require('./webrtc');
app.on('browser-window-created', (event, window) => {
setWebRTCBlockingPolicy(window.webContents);
}); We can probably directly do window.webContents.setWebRTCIPHandlingPolicy('disable_non_proxied_udp'); instead of importing and calling the function, but I'm just too tired at this point. You probably know what to do. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing an electron webapp that uses random public proxies at startup, but the real public IP always ends up leaking. Electron doesn't have any option to disable it, at least not in their documentation.
Is there any way to block WebRTC everywhere using adblocker?
Beta Was this translation helpful? Give feedback.
All reactions