admin管理员组文章数量:1126295
I'm trying to intercept network requests to certain domains for the entire device (only care about mac for now), not just within the electron app.
For instance, if a user goes to safari and tries to go to tiktok, they will be redirected or have the request blocked completely. Is this not possible with Electron's existing apis?
I'm trying to intercept network requests to certain domains for the entire device (only care about mac for now), not just within the electron app.
For instance, if a user goes to safari and tries to go to tiktok.com, they will be redirected or have the request blocked completely. Is this not possible with Electron's existing apis?
Share asked Jan 8 at 23:20 Peter LimPeter Lim 536 bronze badges1 Answer
Reset to default 0Electron does not support intercepting network requests issued by other applications as such. It does provide some APIs like protocol
that can be used to intercept network requests within the Electron application only.
That being said, Electron let's you use all Node.js APIs, including the child process API, which can be used to execute shell commands and run other applications installed on the same system. This way, you may be able to set up a local proxy server to intercept HTTP requests or change the firewall settings to block outgoing connections.
本文标签: Electron JSaccess device network requestsStack Overflow
版权声明:本文标题:Electron JS - access device network requests - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736682923a1947514.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论