构建电子应用程序以通过代理路由所有网络流量

问题描述 投票:0回答:0

我目前正在构建一个项目来构建一个拦截所有网络流量并通过另一台服务器代理的电子应用程序。问题是,我找不到任何资源来实现这一目标。

**我不想只通过代理路由电子应用程序流量。我希望应用程序进行更改以在底层操作系统中添加代理设置。 **

我尝试使用 protocol.interceptHttpProtocol

protocol.interceptHttpProtocol(scheme, handler)
scheme string
handler Function
request ProtocolRequest
callback Function
response ProtocolResponse
Returns boolean - Whether the protocol was successfully intercepted

Intercepts scheme protocol and uses handler as the protocol's new handler which sends a new HTTP request as a response.

但这只是对电子应用程序进行拦截,并没有拦截通过系统的所有网络流量。

是否可以拦截所有通过系统的网络流量?

proxy electron http-proxy electron-forge
© www.soinside.com 2019 - 2024. All rights reserved.