From 5c501ac9a61da1804f816ddcff812939c06c5c37 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Wed, 19 Dec 2018 16:26:28 +0530 Subject: NE: Log whether tunnel was activated from the app or not Signed-off-by: Roopesh Chander --- WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'WireGuard') diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift index 814ed59..f0ae3e7 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -41,6 +41,12 @@ class PacketTunnelProvider: NEPacketTunnelProvider { let tunnelName = tunnelConfiguration.interface.name wg_log(.info, message: "Starting tunnel '\(tunnelName)'") + if activationAttemptId != nil { + wg_log(.info, staticMessage: "Tunnel activated from the app") + } else { + wg_log(.info, staticMessage: "Tunnel not activated from the app") + } + let isActivateOnDemandEnabled = tunnelProviderProtocol.isActivateOnDemandEnabled if isActivateOnDemandEnabled { wg_log(.info, staticMessage: "Tunnel has Activate On Demand enabled") -- cgit v1.2.3-59-g8ed1b