iOS_VPNPlugIn icon indicating copy to clipboard operation
iOS_VPNPlugIn copied to clipboard

I filled the project but cannot install the plugin~~

Open WhoIsYourBaby opened this issue 10 years ago • 5 comments

I fixed the project at https://github.com/ligun123/iOS_VPNPlugin. But this project cannot install the plugin on the iOS devices. Would you please help me ??? Thanks very much.

WhoIsYourBaby avatar Oct 15 '14 02:10 WhoIsYourBaby

To install on non-jailbroken devices, you need some special entitlements. But your iOS dev certificates might not be able to sign this. :(

— Sent from Mailbox

On Wed, Oct 15, 2014 at 10:41 AM, HalloWorld [email protected] wrote:

I fixed the project at https://github.com/ligun123/iOS_VPNPlugin. But this project cannot install the plugin on the iOS devices. Would you please help me ???

Thanks very much.

Reply to this email directly or view it on GitHub: https://github.com/Smartype/iOS_VPNPlugIn/issues/4

Smartype avatar Oct 15 '14 02:10 Smartype

In other words, you can not use this interface on non-jailbroken devices without signing an NDA with apple to get a special certificate. 

— Sent from Mailbox

On Wed, Oct 15, 2014 at 10:41 AM, HalloWorld [email protected] wrote:

I fixed the project at https://github.com/ligun123/iOS_VPNPlugin. But this project cannot install the plugin on the iOS devices. Would you please help me ???

Thanks very much.

Reply to this email directly or view it on GitHub: https://github.com/Smartype/iOS_VPNPlugIn/issues/4

Smartype avatar Oct 15 '14 02:10 Smartype

Thanks very much.

WhoIsYourBaby avatar Oct 17 '14 07:10 WhoIsYourBaby

Hi Smartype, How can I sign an NDA with apple to get the special certificate? Thanks for any information.

zzzhangcn avatar Dec 11 '14 09:12 zzzhangcn

Have you tried running this on an actual iPhone after adding the Personal VPN capability in Xcode?

After doing that, I still get Operation not permitted on the iOS simulator, but it appears to load the plugin just fine on an actual iPhone (iPhone 6 Plus, Xcode 6.3, iOS 8.2 and 8.3).

I get the plugin to load, but I'm then having a hard time getting the app to find configurations that its adding. The configurations get added, and show up under Settings -> VPN, but when the app tries to find them, it comes up empty.

I added this function to OVCVPNController, to try to cram in a very simple config. This shows up in Settings -> VPN, but the app can't attach to the plugin using a reference to this config, and OVCVPNController's copyConfigurations doesn't find these, so it comes up empty:

- (BOOL) createDummyConfig {
VPNConfigurationRef conf = VPNConfigurationCreate(OPENVPN_PLUGIN_TYPE);
if (conf == NULL) {
printf("VPNConfigurationCreate() failed: %@", VPNCopyLastError());
return NO;
}

NSString* confName = @"my_vpn_config";
Boolean enabled = VPNConfigurationSetName(conf, (__bridge CFStringRef) confName);
if (!enabled) {
printf("VPNConfigurationSetName() failed: %@", VPNCopyLastError());
return NO;
}

NSMutableDictionary* settings = [NSMutableDictionary dictionary];
NSMutableDictionary* files = [NSMutableDictionary dictionary];
[settings setObject:files forKey:@"files"];

printf("Created a config");

    [_vpnConfigurations addObject:(__bridge id)(conf)];

    enabled = VPNConfigurationSet(conf, (__bridge CFMutableDictionaryRef)settings);
    if (!enabled) {
        printf("VPNConfigurationSet() failed: %@", VPNCopyLastError());
        return NO;
    }

    printf("Set the config");

    NSMutableDictionary* vendorSettings = [NSMutableDictionary dictionary];
    enabled = VPNConfigurationSetVendorData(conf, (__bridge CFMutableDictionaryRef)vendorSettings);
    if (!enabled) {
        printf("VPNConfigurationSetVendorData() failed: %@", VPNCopyLastError());
        return NO;
    }

    printf("Set the vendor data");

    enabled = VPNConfigurationSetEnabled(conf, TRUE);
    if (!enabled) {
        printf("VPNConfigurationSetEnabled() failed: %@", VPNCopyLastError());
        return NO;
    }

    printf("Enabled the config");

    return YES;
}

DamionWaltermeyer avatar Apr 09 '15 17:04 DamionWaltermeyer