mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Defined an object containing TUN configuration
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// TUNConfiguration.h
|
||||
// OpenVPN iOS Client
|
||||
//
|
||||
// Created by Sergey Abramchuk on 26.02.17.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class NEIPv4Route;
|
||||
|
||||
@interface TUNConfiguration : NSObject
|
||||
|
||||
@property (strong, nonatomic) NSString *remoteAddress;
|
||||
|
||||
@property (readonly, strong, nonatomic) NSMutableArray<NSString *> *localAddresses;
|
||||
@property (readonly, strong, nonatomic) NSMutableArray<NSString *> *subnets;
|
||||
|
||||
@property (readonly, strong, nonatomic) NSMutableArray<NEIPv4Route *> *includedRoutes;
|
||||
@property (readonly, strong, nonatomic) NSMutableArray<NEIPv4Route *> *excludedRoutes;
|
||||
|
||||
@property (readonly, strong, nonatomic) NSMutableArray<NSString *> *dnsAddresses;
|
||||
@property (readonly, strong, nonatomic) NSMutableArray<NSString *> *searchDomains;
|
||||
|
||||
@property (strong, nonatomic) NSNumber *mtu;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// TUNConfiguration.m
|
||||
// OpenVPN iOS Client
|
||||
//
|
||||
// Created by Sergey Abramchuk on 26.02.17.
|
||||
//
|
||||
//
|
||||
|
||||
#import "TUNConfiguration.h"
|
||||
|
||||
@implementation TUNConfiguration
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_localAddresses = [NSMutableArray new];
|
||||
_subnets = [NSMutableArray new];
|
||||
|
||||
_includedRoutes = [NSMutableArray new];
|
||||
_excludedRoutes = [NSMutableArray new];
|
||||
|
||||
_dnsAddresses = [NSMutableArray new];
|
||||
_searchDomains = [NSMutableArray new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user