mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Return expiration and platform
This commit is contained in:
@@ -158,6 +158,16 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter
|
||||
return [[OpenVPNInterfaceStats alloc] initWithInterfaceStats:stats];
|
||||
}
|
||||
|
||||
+ (NSDate *)expiration {
|
||||
NSNumber *time = [NSNumber numberWithInteger:OpenVPNClient::app_expire()];
|
||||
return [NSDate dateWithTimeIntervalSince1970:[time doubleValue]];
|
||||
}
|
||||
|
||||
+ (NSString *)platform {
|
||||
std::string platform = OpenVPNClient::platform();
|
||||
return [NSString stringWithUTF8String:platform.c_str()];
|
||||
}
|
||||
|
||||
#pragma mark Client Configuration
|
||||
|
||||
- (OpenVPNProperties *)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration error:(out NSError * __nullable * __nullable)error {
|
||||
|
||||
Reference in New Issue
Block a user