2

我正在使用以编程方式配置和启动PPTPL2TP协议

L2tpService l2tpService = new L2tpService();

VpnServiceBinder vpnServiceBinder = new VpnServiceBinder();

L2tpProfile l2tpProfile = new L2tpProfile();
l2tpProfile.setSecretEnabled(true);
l2tpProfile.setSecretString("123456");
l2tpProfile.setName("test");

l2tpService.setContext(vpnServiceBinder, l2tpProfile);

Intent intent = new Intent(getApplicationContext(), vpnServiceBinder.getClass());
startService(intent);

运行此代码后

l2tpService.connect("136.243.133.200", "test", "K@test");

错误:

无法将属性“ctl.start”设置为“mtpd”:连接失败;errno=13(权限被拒绝)

请帮我。

4

0 回答 0