【问题标题】:configure VPN programatically using Protocol- L2TP/IPsec android open source code.使用 Protocol-L2TP/IPsec android 开源代码以编程方式配置 VPN。
【发布时间】:2017-07-26 13:41:35
【问题描述】:

我们正在寻找使用 Protocol-L2TP/IPsec android 开源代码以编程方式配置 VPN。

我试过https://android.googlesource.com/platform/development/+/master/samples/ToyVpn/src/com/example/android/toyvpn/ToyVpnClient.java

这里是配置用户个人资料信息

Intent intent = new Intent(this, ToyVpnService.class)
.putExtra(prefix + ".ADDRESS", mServerAddress.getText().toString())
.putExtra(prefix + ".PORT", mServerPort.getText().toString())
.putExtra(prefix + ".SECRET", mSharedSecret.getText().toString());
startService(intent);

在使用共享的 USERID 和密码建立连接后,我想管理服务器 VPN 设置的名称、类型、服务器地址、IPSEC 预共享密钥。

【问题讨论】:

    标签: android vpn ipsec l2tp


    【解决方案1】:

    我没有找到通过ToyVpn 使用配置的方法。我的解决方案是strongSwan开源vpn客户端

    【讨论】:

    • 非常感谢,让我试试 Google Play 商店 APK 中的 strongSwan。这是否适用于我的规范配置
    • 我已尝试安装此 apk - play.google.com/store/apps/details?id=org.strongswan.android 但这对我不起作用。当直接时,我在移动设置上进行配置设置,然后工作正常,但无法使用我自己的配置文件使用 StrongSwan 输入。
    • 我正在使用NDK编译源代码,我会尽快更新你。
    • 不,strongSwan 没有实现 L2TP。我已经交叉检查了 strongSwan 的任何其他开源代码
    • 我有以下信息服务器-XXXX 协议-L2TP/IPsec PSK-123456 PORT-L2TP -udp 1701 连接后,这是拨号凭据-用户名-XXXX 密码-XXXX 请告诉我如何我通过android代码连接这个
    猜你喜欢
    • 1970-01-01
    • 2012-11-22
    • 2022-11-13
    • 1970-01-01
    • 2015-05-02
    • 1970-01-01
    • 2018-12-07
    • 2012-05-13
    • 2018-10-05
    相关资源
    最近更新 更多