From 0921e440364d660aad76be28d6fc128d5a35f677 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Tue, 16 Apr 2024 13:41:27 +0200 Subject: [PATCH] Makes some changes to anonymize some of the VPN metadata --- .../NetworkProtectionTunnelFailureMonitor.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/NetworkProtection/Diagnostics/NetworkProtectionTunnelFailureMonitor.swift b/Sources/NetworkProtection/Diagnostics/NetworkProtectionTunnelFailureMonitor.swift index 12d92a7ff..c7c1bee51 100644 --- a/Sources/NetworkProtection/Diagnostics/NetworkProtectionTunnelFailureMonitor.swift +++ b/Sources/NetworkProtection/Diagnostics/NetworkProtectionTunnelFailureMonitor.swift @@ -157,7 +157,17 @@ extension Network.NWPath { description += "unsatisfiedReason: \(unsatisfiedReason), " } - description += "availableInterfaces: \(availableInterfaces), " + let tunnelCount = availableInterfaces.filter { interface in + interface.type == .other && interface.name.contains("utun") + }.count + + let dnsCount = availableInterfaces.filter { interface in + interface.type == .other && interface.name.contains("dns") + }.count + + description += "mainInterfaceType: \(String(describing: availableInterfaces.first?.type)), " + description += "tunnelInterfaceCount: \(tunnelCount), " + description += "dnsInterfaceCount: \(dnsCount)), " description += "isConstrained: \(isConstrained ? "true" : "false"), " description += "isExpensive: \(isExpensive ? "true" : "false")" description += ")"