mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Return transport stats and interface stats
This commit is contained in:
@@ -14,13 +14,15 @@
|
||||
|
||||
#import <NetworkExtension/NetworkExtension.h>
|
||||
|
||||
#import "OpenVPNClient.h"
|
||||
#import "OpenVPNError.h"
|
||||
#import "OpenVPNEvent.h"
|
||||
#import "OpenVPNConfiguration+Internal.h"
|
||||
#import "OpenVPNCredentials+Internal.h"
|
||||
#import "OpenVPNProperties+Internal.h"
|
||||
#import "OpenVPNConnectionInfo+Internal.h"
|
||||
#import "OpenVPNClient.h"
|
||||
#import "OpenVPNTransportStats+Internal.h"
|
||||
#import "OpenVPNInterfaceStats+Internal.h"
|
||||
#import "OpenVPNAdapter.h"
|
||||
#import "OpenVPNAdapter+Internal.h"
|
||||
#import "OpenVPNAdapter+Public.h"
|
||||
@@ -139,6 +141,16 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter
|
||||
return info.defined ? [[OpenVPNConnectionInfo alloc] initWithConnectionInfo:info] : nil;
|
||||
}
|
||||
|
||||
- (OpenVPNTransportStats *)transportStats {
|
||||
ClientAPI::TransportStats stats = self.vpnClient->transport_stats();
|
||||
return [[OpenVPNTransportStats alloc] initWithTransportStats:stats];
|
||||
}
|
||||
|
||||
- (OpenVPNInterfaceStats *)interfaceStats {
|
||||
ClientAPI::InterfaceStats stats = self.vpnClient->tun_stats();
|
||||
return [[OpenVPNInterfaceStats alloc] initWithInterfaceStats:stats];
|
||||
}
|
||||
|
||||
#pragma mark Client Configuration
|
||||
|
||||
- (OpenVPNProperties *)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration error:(out NSError * __nullable * __nullable)error {
|
||||
|
||||
Reference in New Issue
Block a user