【问题标题】:Programmatically configure PPTP/ L2TP VPN in Android在 Android 中以编程方式配置 PPTP/L2TP VPN
【发布时间】:2012-11-22 04:10:55
【问题描述】:

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

注意: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.

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

【问题讨论】:

  • 需要自己实现PPTP协议。我本人目前正在研究这个问题,因为我有一个适用于 2.x 的有效 VPN/PPTP 连接,并且希望它也适用于 4.x。尝试查看 Hideman 的源代码 - 他们正在这样做:)

标签: java android api vpn


【解决方案1】:

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

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

【讨论】:

  • 你能解释一下[使用自己的VPN堆栈(可能是PPTP/LT2P/ToyVPN/OpenVPN/MyOwnVerySecure VPN协议)]是什么意思,因为我没有得到很好,是否可以为 Android 创建一个 L2TP VPN,如果可以,请分享一些有用的资源。
  • 理论上可以肯定。您只需要自己实现 L2TP 或移植现有的 l2tp 实现。
  • 你能说说你说的是哪个API吗?
猜你喜欢
  • 1970-01-01
  • 2017-07-26
  • 1970-01-01
  • 2015-06-28
  • 2015-05-02
  • 2015-03-22
  • 2012-05-13
  • 2018-12-07
  • 2013-12-23
相关资源
最近更新 更多