简体   繁体   English

有人知道系统应用程序是否可以在Android中扩展VpnService吗?

[英]Does anybody know whether a system app can extend VpnService in Android or not?

Now, I want to develop a system app which will extend VpnService. 现在,我想开发一个将扩展VpnService的系统应用程序。 But when I call the method 'establish()' to initialize an instance of ParcelFileDescriptor. 但是,当我调用方法“ Establishment()”来初始化ParcelFileDescriptor的实例时。 I got an exception in android 5.0 as below: 我在android 5.0中遇到异常,如下所示:

08-23 20:47:35.482 12344-12365/com.vm.shadowsocks W/System.err: java.lang.SecurityException: Cannot find com.vm.shadowsocks.core.LocalVpnService
            at android.os.Parcel.readException(Parcel.java:1546)
            at android.os.Parcel.readException(Parcel.java:1499)
    08-23 20:47:35.483 12344-12365/com.vm.shadowsocks W/System.err:     at android.net.IConnectivityManager$Stub$Proxy.establishVpn(IConnectivityManager.java:1779)
            at android.net.VpnService$Builder.establish(VpnService.java:768)
            at com.vm.shadowsocks.core.LocalVpnService.establishVPN(LocalVpnService.java:467)
            at com.vm.shadowsocks.core.LocalVpnService.runVPN(LocalVpnService.java:256)
            at com.vm.shadowsocks.core.LocalVpnService.run(LocalVpnService.java:239)

Thanks! 谢谢!

A normal (user) app can extend VpnService ( documentation ) so I don't know why a system app shouldn't be able to do this. normal (用户)应用程序可以扩展VpnService文档 ),所以我不知道为什么系统应用程序不应该这样做。

To interpret you error message is however rather hard frankly, without knowing any of your code. 坦率地说,在不知道任何代码的情况下很难解释错误消息。 Also, you maybe might want to use an existing (open-source) implementation like eg strongSwan . 另外,您可能想要使用现有的(开源)实现,例如strongSwan

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否有人知道可以将本地html / css / javascript文件集作为应用程序托管的框架? - Does anybody know of a framework that can host a local set of html/css/javascript files as an App? 我怎么知道一个android app小部件是否在后台 - how can I know whether an android app widget is in background Android——我怎么知道应用是否自动启动 - Android——How can i know whether the app is autostart or not 有人知道如何证明ANDROID布局中的textview内容合理吗? - Does anybody know how to justify a textview content in a ANDROID layout? 有人知道这件事是如何在 android studio 3.5 中触发的吗 - Does anybody know how this thing triggers in android studio 3.5 使用Android VPN服务的Android VPN应用 - Android vpn app using android vpnservice 如何为任何人都可以知道的Android横幅设置此动画 - how to set this animation for the android banner anybody can know Android VpnService如何保护fd工作? - How does Android VpnService protect fd work? 无法使用新的Android 4.0 VpnService框架 - Can not use new Android 4.0 VpnService framework 有人知道“ Uncaught ReferenceError:未定义分析”是什么意思吗?为什么安装后没有应用程序用户? - Does anybody know what does “ Uncaught ReferenceError: analytics is not defined ” mean n why no app user after installation?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM