在 Android 中以编程方式配置 PPTP/L2TP VPN

2022-09-04 04:17:59

我已经阅读了有关VpnServiceVpnService.Builder的信息,但无法获得任何将VPN类型设置为PPTP或L2TP的方法,即使我没有得到任何可以设置用户/密码的方法。

注意: There are many questions in SO I read them but didn't find solution. I looked into ToyVpn application but this there are only 3 parameters we set in this application.

请帮忙。如果有3方API,请提供参考。


答案 1

是的,stackoverflow中的所有答案都应该告诉您VPNService API用于创建您自己的VPN应用程序,其中包含自己的VPN堆栈(可能恰好是PPTP / LT2P / ToyVPN / OpenVPN / MyOwnVerySecure VPN协议),而不是配置系统VPN。

用于配置系统 VPN 的 API 很简单,SDK 中不包含这些 API。


答案 2

推荐