Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPN Domain Exclusions pixel changes #3242

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ extension Pixel {
case networkProtectionFailedToLoadFromPreferences
case networkProtectionFailedToSaveToPreferences
case networkProtectionActivationRequestFailed
case networkProtectionFailedToStartTunnel

case networkProtectionDisconnected

Expand Down Expand Up @@ -1181,7 +1180,6 @@ extension Pixel.Event {
case .networkProtectionFailedToLoadFromPreferences: return "m_netp_network_extension_error_failed_to_load_from_preferences"
case .networkProtectionFailedToSaveToPreferences: return "m_netp_network_extension_error_failed_to_save_to_preferences"
case .networkProtectionActivationRequestFailed: return "m_netp_network_extension_error_activation_request_failed"
case .networkProtectionFailedToStartTunnel: return "m_netp_failed_to_start_tunnel"
case .networkProtectionDisconnected: return "m_netp_vpn_disconnect"
case .networkProtectionNoAccessTokenFoundError: return "m_netp_no_access_token_found_error"
case .networkProtectionMemoryWarning: return "m_netp_vpn_memory_warning"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// Initial implementation for initial Network Protection tests. Will be fleshed out with https://app.asana.com/0/1203137811378537/1204630829332227/f
final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider {

private static var vpnLogger = VPNLogger()

Check warning on line 34 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'VPNLogger' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 34 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'VPNLogger' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore
private var cancellables = Set<AnyCancellable>()
private let accountManager: AccountManager

Expand All @@ -46,7 +46,7 @@
withAdditionalParameters: [PixelParameters.vpnCohort: UniquePixel.cohort(from: defaults.vpnFirstEnabled)],
includedParameters: [.appVersion, .atb])
case .connectionTesterStatusChange(let status, let server):
vpnLogger.log(status, server: server)

Check warning on line 49 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'log(_:server:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 49 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log(_:server:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch status {
case .failed(let duration):
Expand Down Expand Up @@ -80,7 +80,7 @@
includedParameters: [.appVersion, .atb])
}
case .reportConnectionAttempt(attempt: let attempt):
vpnLogger.log(attempt)

Check warning on line 83 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'log' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 83 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch attempt {
case .connecting:
Expand All @@ -97,7 +97,7 @@
includedParameters: [.appVersion, .atb])
}
case .reportTunnelFailure(result: let result):
vpnLogger.log(result)

Check warning on line 100 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'log' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 100 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch result {
case .failureDetected:
Expand All @@ -108,7 +108,7 @@
defaults.updateNetworkPath(with: newPath)
}
case .reportLatency(result: let result):
vpnLogger.log(result)

Check warning on line 111 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'log' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 111 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch result {
case .error:
Expand All @@ -118,7 +118,7 @@
DailyPixel.fireDailyAndCount(pixel: .networkProtectionLatency(quality: quality), includedParameters: [.appVersion, .atb])
}
case .rekeyAttempt(let step):
vpnLogger.log(step, named: "Rekey")

Check warning on line 121 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'log(_:named:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 121 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log(_:named:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch step {
case .begin:
Expand All @@ -129,7 +129,7 @@
DailyPixel.fireDailyAndCount(pixel: .networkProtectionRekeyCompleted)
}
case .tunnelStartAttempt(let step):
vpnLogger.log(step, named: "Tunnel Start")

Check warning on line 132 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

'log(_:named:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

Check warning on line 132 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log(_:named:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch step {
case .begin:
Expand All @@ -140,7 +140,7 @@
DailyPixel.fireDailyAndCount(pixel: .networkProtectionTunnelStartSuccess)
}
case .tunnelStopAttempt(let step):
vpnLogger.log(step, named: "Tunnel Stop")

Check warning on line 143 in PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

'log(_:named:)' is deprecated: This goes against Apple logging guidelines and will be removed, please don't use it anymore

switch step {
case .begin:
Expand Down Expand Up @@ -304,15 +304,6 @@
}
}

public override func startTunnel(options: [String: NSObject]?, completionHandler: @escaping (Error?) -> Void) {
super.startTunnel(options: options) { error in
if error != nil {
DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailedToStartTunnel, error: error)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pixel is a duplication of networkProtectionTunnelStartFailure and is not needed.

}
completionHandler(error)
}
}

public override func stopTunnel(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) {
switch reason {
case .appUpdate, .userInitiated:
Expand Down
Loading