Declare open vpn adapter class and methods for client configuration

This commit is contained in:
Sergey Abramchuk
2017-02-11 15:16:25 +03:00
parent bc67a391b0
commit bc37cef1a4
3 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
//
// OpenVPNAdapter+Client.h
// OpenVPN iOS Client
//
// Created by Sergey Abramchuk on 11.02.17.
//
//
#import <openvpn/client/ovpncli.hpp>
#import "OpenVPNAdapter.h"
using namespace openvpn;
@interface OpenVPNAdapter (Client)
- (BOOL)configureSockets;
- (void)setRemoteAddress:(NSString *)address;
- (void)addLocalAddress:(NSString *)address subnet:(NSString *)subnet gateway:(NSString *)gateway;
- (void)addRoute:(NSString *)route subnet:(NSString *)subnet;
- (void)excludeRoute:(NSString *)route subnet:(NSString *)subnet;
- (void)addDNSAddress:(NSString *)address;
- (void)addSearchDomain:(NSString *)domain;
- (void)setMTU:(NSInteger)mtu;
- (NSInteger)establishTunnel;
- (void)handleEvent:(const ClientAPI::Event *)event;
- (void)handleLog:(const ClientAPI::LogInfo *)log;
@end

View File

@@ -0,0 +1,14 @@
//
// OpenVPNAdapter.h
// OpenVPN iOS Client
//
// Created by Sergey Abramchuk on 11.02.17.
//
//
#import <Foundation/Foundation.h>
@interface OpenVPNAdapter : NSObject
@end

View File

@@ -0,0 +1,14 @@
//
// OpenVPNAdapter.m
// OpenVPN iOS Client
//
// Created by Sergey Abramchuk on 11.02.17.
//
//
#import "OpenVPNAdapter.h"
@implementation OpenVPNAdapter
@end