2017-02-11 20:16:25 +08:00
|
|
|
//
|
|
|
|
// 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;
|
|
|
|
|
2017-02-11 20:18:56 +08:00
|
|
|
- (BOOL)setRemoteAddress:(NSString *)address;
|
2017-02-11 20:16:25 +08:00
|
|
|
|
2017-02-11 20:18:56 +08:00
|
|
|
- (BOOL)addLocalAddress:(NSString *)address subnet:(NSString *)subnet gateway:(NSString *)gateway;
|
2017-02-11 20:16:25 +08:00
|
|
|
|
2017-02-11 20:18:56 +08:00
|
|
|
- (BOOL)addRoute:(NSString *)route subnet:(NSString *)subnet;
|
|
|
|
- (BOOL)excludeRoute:(NSString *)route subnet:(NSString *)subnet;
|
2017-02-11 20:16:25 +08:00
|
|
|
|
2017-02-11 20:18:56 +08:00
|
|
|
- (BOOL)addDNSAddress:(NSString *)address;
|
|
|
|
- (BOOL)addSearchDomain:(NSString *)domain;
|
2017-02-11 20:16:25 +08:00
|
|
|
|
2017-02-11 20:18:56 +08:00
|
|
|
- (BOOL)setMTU:(NSInteger)mtu;
|
2017-02-11 20:16:25 +08:00
|
|
|
|
|
|
|
- (NSInteger)establishTunnel;
|
|
|
|
|
|
|
|
- (void)handleEvent:(const ClientAPI::Event *)event;
|
|
|
|
- (void)handleLog:(const ClientAPI::LogInfo *)log;
|
|
|
|
|
|
|
|
@end
|