/
ITSVPNManager.h
47 lines (35 loc) · 1.3 KB
/
ITSVPNManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// ITSVPNClass.h
// Simple VPN Wrapper
//
// Created by Benjamin de Bos on 21-06-15.
// Copyright (c) 2015 ITS-Vision. All rights reserved.
//
#import <NetworkExtension/NetworkExtension.h>
#import <Security/Security.h>
@interface ITSVPNManager : NSObject
//setup the VPN Manager
@property (nonatomic,retain) NEVPNManager *vpnmanager;
//create profile
-(void)createProfileForServer:(NSString*)server
withUsername:(NSString*)username
andPassword:(NSData*)password
andSecret:(NSData*)secret
withTitle:(NSString*)title
andProtocol:(NSString*)protocol
completionBlock:(void (^)(void))completionBlock;
//checking if the profile is installed
-(void)checkIfProfileIsInstalled:(void (^)(BOOL isInstalled))completionBlock;
//removing a tunnel
-(void)removeVpnConnection:(void (^)(BOOL isRemoved))completionBlock;
//starting the tunnel
-(void)startVpnTunnel;
//stopping the tunnel
-(void)stopVPNConnection;
//get reference from keychain
-(NSData *)getKeyChainItemReferenceFromIdentifier:(NSString *)identifier;
//get keychain item as a string
-(NSString*)getKeyChainStringFromIdentifier:(NSString*)identifier;
//setting an item
-(BOOL)setKeyChainString:(NSString*)string forIdentifier:(NSString*)identifier;
@end