简体   繁体   English

Android管理API和VpnService

[英]Android Management API and VpnService

I'm using android tablets in kiosk mode where only one application is allowed. 我在仅允许使用一个应用程序的信息亭模式下使用android平板电脑。 And I also use 3G network. 而且我也使用3G网络。 To save traffic, I use the special launcher on every application which uses VpnService android API. 为了节省流量,我在每个使用VpnService android API的应用程序上使用特殊的启动器。 And also this launcher prevents a user from accessing to other apps. 而且,此启动器还可以防止用户访问其他应用。

Android Management API provides kiosk mode functionality, but I don't see any reference to VPN configuration. Android Management API提供信息亭模式功能,但我看不到任何VPN配置参考。 How can I configure network traffic with it? 如何配置网络流量?

You can configure always-on-VPN with the Android Management API by setting alwaysOnVpnPackage and vpnConfigDisabled in the Policy : 您可以通过在Policy中设置alwaysOnVpnPackagevpnConfigDisabled来使用Android Management API配置永远在线VPN:

{
  "applications": [
    {
      "packageName": "my.vpn.app",
      "installType": "FORCE_INSTALLED",
      "defaultPermissionPolicy": "GRANT"
    },
  ],
  "alwaysOnVpnPackage": {
    "packageName": "my.vpn.app",
    "lockdownEnabled": true
  },
  "vpnConfigDisabled": true
}

If your VPN app supports managed configurations you can configure it via the Policy without manual interaction. 如果您的VPN应用支持托管配置,则可以通过策略进行配置,而无需手动交互。 Otherwise you will have to configure the VPN app manually the first time before turning on kiosk mode. 否则,您必须在首次打开信息亭模式之前第一次手动配置VPN应用。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM