mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +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;
|
@property (nonatomic) NSInteger connectionTimeout;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Keep tun interface active during pauses or reconnections
|
||||||
|
*/
|
||||||
|
@property (nonatomic) BOOL tunPersist;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -118,6 +118,10 @@ using namespace openvpn;
|
|||||||
case IPv6PreferenceDefault:
|
case IPv6PreferenceDefault:
|
||||||
_config.ipv6 = "default";
|
_config.ipv6 = "default";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
NSAssert(NO, @"Incorrect IPv6Preference value");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,4 +133,12 @@ using namespace openvpn;
|
|||||||
_config.connTimeout = connectionTimeout;
|
_config.connTimeout = connectionTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)tunPersist {
|
||||||
|
return _config.tunPersist;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setTunPersist:(BOOL)tunPersist {
|
||||||
|
_config.tunPersist = tunPersist;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user