OpenVPNAdapter/OpenVPN Adapter/OpenVPNConfiguration.h

146 lines
3.2 KiB
C
Raw Normal View History

//
// OpenVPNConfiguration.h
// OpenVPN Adapter
//
// Created by Sergey Abramchuk on 21.04.17.
//
//
#import <Foundation/Foundation.h>
#import "OpenVPNTransportProtocol.h"
#import "OpenVPNIPv6Preference.h"
#import "OpenVPNCompressionMode.h"
#import "OpenVPNMinTLSVersion.h"
#import "OpenVPNTLSCertProfile.h"
2017-04-26 17:54:21 +08:00
/**
Class used to pass configuration
*/
@interface OpenVPNConfiguration : NSObject <NSCopying, NSSecureCoding>
2017-04-23 01:19:28 +08:00
/**
OpenVPN profile as a NSData
*/
2017-04-22 00:28:09 +08:00
@property (nullable, nonatomic) NSData *fileContent;
2017-04-23 01:19:28 +08:00
/**
OpenVPN profile as series of key/value pairs (may be provided exclusively
or in addition to file content).
*/
@property (nullable, nonatomic) NSDictionary<NSString *, NSString *> *settings;
2017-04-23 03:45:16 +08:00
/**
Set to identity OpenVPN GUI version.
Format should be "<gui_identifier><space><version>"
Passed to server as IV_GUI_VER.
*/
@property (nullable, nonatomic) NSString *guiVersion;
2017-04-23 01:19:28 +08:00
/**
Use a different server than that specified in "remote"
option of profile
*/
@property (nullable, nonatomic) NSString *server;
/**
Force a given transport protocol
*/
@property (nonatomic) OpenVPNTransportProtocol proto;
2017-04-23 18:35:34 +08:00
/**
IPv6 preference
*/
@property (nonatomic) OpenVPNIPv6Preference ipv6;
2017-04-23 18:35:34 +08:00
/**
Connection timeout in seconds, or 0 to retry indefinitely
*/
@property (nonatomic) NSInteger connectionTimeout;
/**
Keep tun interface active during pauses or reconnections
*/
@property (nonatomic) BOOL tunPersist;
2017-04-23 19:10:40 +08:00
/**
2017-06-01 15:59:38 +08:00
If YES and a redirect-gateway profile doesn't also define
2017-04-23 19:10:40 +08:00
DNS servers, use the standard Google DNS servers.
*/
@property (nonatomic) BOOL googleDNSFallback;
/**
Enable autologin sessions
*/
@property (nonatomic) BOOL autologinSessions;
/**
If YES, don't send client cert/key to peer
*/
@property (nonatomic) BOOL disableClientCert;
/**
SSL library debug level
*/
@property (nonatomic) NSInteger sslDebugLevel;
/**
Compression mode
*/
@property (nonatomic) OpenVPNCompressionMode compressionMode;
/**
Private key password
*/
@property (nullable, nonatomic) NSString *privateKeyPassword;
/**
Default key direction parameter for tls-auth (0, 1,
or -1 (bidirectional -- default)) if no key-direction
parameter defined in profile
*/
@property (nonatomic) NSInteger keyDirection;
/**
If YES, force ciphersuite to be one of:
1. TLS_DHE_RSA_WITH_AES_256_CBC_SHA, or
2. TLS_DHE_RSA_WITH_AES_128_CBC_SHA
and disable setting TLS minimum version.
This is intended for compatibility with legacy systems.
*/
@property (nonatomic) BOOL forceCiphersuitesAESCBC;
/**
Override the minimum TLS version
*/
@property (nonatomic) OpenVPNMinTLSVersion minTLSVersion;
/**
Override or default the tls-cert-profile setting
*/
@property (nonatomic) OpenVPNTLSCertProfile tlsCertProfile;
/**
Pass custom key/value pairs to OpenVPN server
*/
@property (nullable, nonatomic) NSDictionary<NSString *, NSString *> *peerInfo;
2017-04-24 21:04:25 +08:00
/**
Pass through pushed "echo" directives via "ECHO" event
*/
@property (nonatomic) BOOL echo;
/**
Pass through control channel INFO notifications via "INFO" event
*/
@property (nonatomic) BOOL info;
2017-04-26 17:54:21 +08:00
/**
Periodic convenience clock tick in milliseconds. Will call
[OpenVPNAdapterDelegate tick] at a frequency defined by this parameter.
Set to 0 to disable.
*/
@property (nonatomic) NSUInteger clockTick;
@end