gpt4 book ai didi

android - Android 上的 VPN 客户端 : questions about VPN client and use of hidden APIs

转载 作者:行者123 更新时间:2023-11-29 16:11:05 25 4
gpt4 key购买 nike

我需要监控 VPN 流量,即我需要读取传入和传出的 VPN 流量。

为此,我正在尝试创建自己的 VPN 客户端,但我没有找到“android.net.VpnService”的任何工作示例,我查看了 android 示例应用程序 ToyVpn,但它没有工作,我出现以下异常:

E/ToyVpnService(2302): Got java.net.PortUnreachableException: 
E/ToyVpnService(2302): Got java.net.SocketException: sendto failed: ECONNREFUSED (Connection refused)

此外,“如何设置用户名”也没有在任何地方提及。

它读到我们可以使用隐藏的 API,但这需要 root 访问权限,现在我没有 root 手机...

关于这种(隐藏 API)方法,我想问的是,使用隐藏 API 的应用程序是创建自己的 VPN 客户端还是使用 android 的默认客户端?如果他们使用 android 的默认客户端,那么仍然可以读取传入和传出的流量吗?

我正在寻找一些关于使用“android.net.VpnService”创建我自己的 vpn 客户端的指南或工作示例。

最佳答案

I need to monitor the VPN traffic i.e. I need to read incoming and outgoing VPN traffic.

除非这是您自己的 VPN 实现,您已经入侵了后门,否则出于明显的安全原因,这最好是不可能的。

I'm getting following exception

即兴发挥,我的猜测是您没有运行 ToyVPN 服务器组件,或者无法从您的测试环境访问它。然而,我已经有一段时间没有玩 ToyVPN 了,而且我不是它的代码库的专家。

Also, it is not mentioned anywhere, "how to set username".

我不记得 ToyVPN 有“用户名”的概念。

It read that we can use hidden APIs but this will require root access

隐藏的 API 与 root 访问无关。

do they create their own VPN client or uses the android's default client?

您必须询问您所指的任何应用程序的作者。

And if they use android's default client then is this still possible to read the incoming and outgoing traffic?

只有它们产生的“传入和传出流量”。出于明显的安全原因,不应该监视其他应用程序的 VPN 流量。

关于android - Android 上的 VPN 客户端 : questions about VPN client and use of hidden APIs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13228834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com