mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-03-17 00:00:03 +08:00
Wrap tun persist property and add assertion to ipv6 setter
This commit is contained in:
@@ -64,4 +64,9 @@ typedef NS_ENUM(NSInteger, IPv6Preference) {
|
||||
*/
|
||||
@property (nonatomic) NSInteger connectionTimeout;
|
||||
|
||||
/**
|
||||
Keep tun interface active during pauses or reconnections
|
||||
*/
|
||||
@property (nonatomic) BOOL tunPersist;
|
||||
|
||||
@end
|
||||
|
||||
@@ -118,6 +118,10 @@ using namespace openvpn;
|
||||
case IPv6PreferenceDefault:
|
||||
_config.ipv6 = "default";
|
||||
break;
|
||||
|
||||
default:
|
||||
NSAssert(NO, @"Incorrect IPv6Preference value");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,4 +133,12 @@ using namespace openvpn;
|
||||
_config.connTimeout = connectionTimeout;
|
||||
}
|
||||
|
||||
- (BOOL)tunPersist {
|
||||
return _config.tunPersist;
|
||||
}
|
||||
|
||||
- (void)setTunPersist:(BOOL)tunPersist {
|
||||
_config.tunPersist = tunPersist;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user