Open MattF42 opened 7 months ago
So I've worked out that we need to extend WireGuardTunnelProvider:
import Foundation
class PacketTunnelProvider: WireGuardTunnelProvider {
override func startTunnel(options: [String : NSObject]? = nil) async throws {
print("In startTunnel")
dataCountInterval = 3000
try await super.startTunnel(options: options)
}
}
However startTunnel never seems to get called.
Any hints on howto record and access the wireguard tunnel stats would be much appreciated
hey did you manage to do it?
Summary
Howto access dataCount for wireguard connections?
Steps to reproduce
What is the current bug behavior?
print(self?.cfg.dataCount ?? "error1") // <-- Value of type 'WireGuardView' has no member 'cfg'
The VPN connects successfully. appGroup is correctly updated to reflect my fork of the Demo codebase. It's not a bug, but I can not seem to work out the correct way to call dataCount for the wireguard connection :(
What is the expected correct behavior?
Please help providing the correct method to access dataCount for wireguard connection
Relevant logs and/or screenshots
N/A
Possible fixes suggested remediation
Documented sample code