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

2.1 InitOVSCore OS X Example

It is required to include provided CoreAPI.h like this:

#include "CoreAPI.h"

To handle JSON you can use JSON-C:

#include <json-c/json.h>

Then we should define callback function:

static void EVCoreNotify(const char *szNotify)
{

}

Callback function accepts JSON encoded as string.

And then we can intialize SDK in the following way, providing path to openvpn binary:

int main(int argc, const char * argv[]) {
    // insert code here...
    int ret;
    ret = InitOVSCore(EVCoreNotify, "/usr/local/sbin/openvpn");
    if (ret != 0)
    {
        exit(1);
    }
    ...
}