Unified in-app VPN SDK's for Microsoft Windows Vista+, Android 4.4+, Mac OS 10.7+, iOS 9.0+, Ubuntu Linux LTS 18.04+. 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.35 changePlan Android Example

I. Providing JSON as a parameter:

VPNSDK.CmdProc("{\"cmd\": 51, \"data\": {\"vpn_type\": 2}}");

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

II. Convenient form:

VPNSDK.CmdProc(VPNSDK.OVS_CMD_CODES.OVS_CMD_SET_VPN_TYPE, new VPNSDK.CommandNotifyCB() {
                @Override
                public void onNotify(int i, int i1, Object o) {
                                                //Here connect method could be invoked
                }
            }, VPNSDK.VPN_TYPES.WIREGUARD);

This form of method accepts following parameters:

  1. Command code
  2. Callback to be invoked after command execution
  3. VPN type

VPN type could be:

  1. VPNSDK.VPN_TYPES.OPENVPN = 0
  2. VPNSDK.VPN_TYPES.IKEv2 = 1
  3. VPNSDK.VPN_TYPES.WIREGUARD = 2
  4. VPNSDK.VPN_TYPES.SHADOWSOCKS = 3

data parameter of callback will be null. Result could be determined based on error parameter of callback.