Unified in-app VPN SDK's for Microsoft Windows Vista+, Android 4.4+ and Mac OS 10.7+. Earlier OS versions can be supported as well by request. Please contact [email protected] to receive your own API key.

Copyright © 2019 VPNWholesaler.com. All rights reserved.

Back

3.21 StartVPNConn Android Example

I. Providing JSON as a parameter:

VPNSDK.CmdProc("{ \"cmd\": 3, \"data\": { \"ip_addr\": \"45.32.158.20\", \"proto\": \"tcp\", \"port\": 1194, \"ipv6_leak\": 1, \"kill_switch\": 1}}");

Result of this command will be returned using onNotify method provided on initialization

II. Convenient form:

VPNSDK.CmdProc(VPNSDK.OVS_CMD_CODES.OVS_CMD_CONNECT, null, "45.32.158.20", "tcp", 1194, 1, 1);

This form of method accepts following parameters:

  1. Command code
  2. null
  3. IP address
  4. Protocol
  5. Port
  6. Ipv6 leak prevention (Integer 0 or 1)
  7. Kill switch enabled (Integer 0 or 1)

This method doesn't invoke its own callback. When VPN state is changed then main callback provided on intialization is invoked.