Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Android 设备上创建了 VPN 客户端,创建 tun0 后,所有流量都通过 tun0 路由。我想阻止通过 tun0 的流量。请让我知道是否可以通过 tun0 阻止流量。
如果您想排除某些应用程序通过您的发送数据VpnService,在Builder.
VpnService
Builder
在你的VpnService:
Builder builder = new Builder(); builder.addAddress(TUNNEL_ADDRESS, 32); // Local address of TUN (?)
要从 VPN 中排除特定应用程序,请使用:
builder.addDisallowedApplication(packageNameOfExcludedApp);