Donal Ryan
Dec 06, 2017
3:46 pm

Knox VPN Client

Hi,

I am using the Knox VPN Client (com.samsung.sVpn) and knox premium sdk to implement a Full VPN.

I want all the traffic on the device to go through this VPN.

I call,

      genericVPNPolicy = ekm.GetGenericVpnPolicy("com.samsung.sVpn", 0)

to bind the VPN to the user space, then i will add all apps to VPN so that all traffic on device goes through VPN.

However this wont work (returns null) unless I create a container e.g. "knox-b2b" which is seperate to user space and will have the default browser in it not protected with VPN. 

I want all browsers in the user space.

Is there a round this? Do i need to create a container?

Thanks,

Donal

 

Samuel G.Samsung SEAP Moderator
Dec 07, 2017
6:42 pm

Hi Donal,

Which implementation of getGenericVpnPolicy are you using? The only one in our APIs is this one, which only takes the vpn package name as a parameter.

Thanks,

Sam

Donal Ryan
Dec 08, 2017
10:15 am

Hi Samuel,

What about the API that takes the container ID as parameter as well as vendor package id: 

public GenericVpnPolicy getGenericVpnPolicy (String vendorPkgName, int containerId)

I have installed the Knox VPN client in the Main User (Non-Container). So I just call:

genericVPNPolicy = ekm.GetGenericVpnPolicy("com.samsung.sVpn", 0)

I can then add the vpn profile configuration and then activate the VPN and then all the data for the apps in the Main User (Non-Container) will go through VPN.

So I guess I dont need to create a Knox Container, does that make sense?

Thanks,

Donal

Samuel G.Samsung SEAP Moderator
Dec 08, 2017
6:08 pm

Hi Donal,

You shouldn't need to create a container to use this API. As per the API reference, there are two implementations of this method, one that takes a containerId and one that only takes the vpn package name. The containerId implementation should only be used if you want the vpn policy to be applied to the container. Simply using getGenericVpnPolicy(String vendorPkgName) should apply the policy to personal space without needing to create a container.

Thanks,
Sam