OpenVPNAdapter/OpenVPN Adapter/OpenVPNConfiguration.h

79 lines
1.7 KiB
C
Raw Normal View History

//
// OpenVPNConfiguration.h
// OpenVPN Adapter
//
// Created by Sergey Abramchuk on 21.04.17.
//
//
#import <Foundation/Foundation.h>
2017-04-22 00:28:09 +08:00
// TODO: Wrap ClientAPI::Config into Objective-C class
2017-04-23 18:35:34 +08:00
/**
IPv6 preference options
*/
typedef NS_ENUM(NSInteger, IPv6Preference) {
/// Request combined IPv4/IPv6 tunnel
2017-04-23 18:35:34 +08:00
IPv6PreferenceEnabled,
/// Disable IPv6, so tunnel will be IPv4-only
2017-04-23 18:35:34 +08:00
IPv6PreferenceDisabled,
/// Leave decision to server
2017-04-23 18:35:34 +08:00
IPv6PreferenceDefault
};
@interface OpenVPNConfiguration : NSObject
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 *serverOverride;
/**
Force a given transport protocol
Should be tcp, udp, or adaptive.
*/
@property (nullable, nonatomic) NSString *protoOverride;
2017-04-23 18:35:34 +08:00
/**
IPv6 preference
*/
@property (nonatomic) IPv6Preference ipv6;
/**
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
/**
If true and a redirect-gateway profile doesn't also define
DNS servers, use the standard Google DNS servers.
*/
@property (nonatomic) BOOL googleDNSFallback;
@end