Skip to content

Commit

Permalink
VPN server failure detection recovery (#2779)
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme committed Apr 30, 2024
1 parent f2fa437 commit ae60548
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
11 changes: 10 additions & 1 deletion Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,12 @@ extension Pixel {
case networkProtectionGeoswitchingSetNearest
case networkProtectionGeoswitchingSetCustom
case networkProtectionGeoswitchingNoLocations


case networkProtectionFailureRecoveryStarted
case networkProtectionFailureRecoveryFailed
case networkProtectionFailureRecoveryCompletedHealthy
case networkProtectionFailureRecoveryCompletedUnhealthy

// MARK: remote messaging pixels

case remoteMessageShown
Expand Down Expand Up @@ -1328,6 +1333,10 @@ extension Pixel.Event {
case .privacyProOfferYearlyPriceClick: return "m_privacy-pro_offer_yearly-price_click"
case .privacyProAddEmailSuccess: return "m_privacy-pro_app_add-email_success_u"
case .privacyProWelcomeFAQClick: return "m_privacy-pro_welcome_faq_click_u"
case .networkProtectionFailureRecoveryStarted: return "m_netp_ev_failure_recovery_started"
case .networkProtectionFailureRecoveryFailed: return "m_netp_ev_failure_recovery_failed"
case .networkProtectionFailureRecoveryCompletedHealthy: return "m_netp_ev_failure_recovery_completed_server_healthy"
case .networkProtectionFailureRecoveryCompletedUnhealthy: return "m_netp_ev_failure_recovery_completed_server_unhealthy"

// MARK: Secure Vault
case .secureVaultL1KeyMigration: return "m_secure-vault_keystore_event_l1-key-migration"
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9710,8 +9710,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 141.1.2;
branch = 142.0.0;
kind = branch;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "f8c73292d4d6724ec81f98bd29dbb2061f1a8cf6",
"version" : "141.1.2"
"branch" : "142.0.0",
"revision" : "2681b5271a4e0582f175771737617adb8a4d6e78"
}
},
{
Expand Down Expand Up @@ -174,7 +174,7 @@
{
"identity" : "trackerradarkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/TrackerRadarKit",
"location" : "https://github.com/duckduckgo/TrackerRadarKit.git",
"state" : {
"revision" : "6c84fd19139414fc0edbf9673ade06e532a564f0",
"version" : "2.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider {
case .success:
DailyPixel.fireDailyAndCount(pixel: .networkProtectionTunnelWakeSuccess)
}
case .failureRecoveryAttempt(let step):
switch step {
case .started:
DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailureRecoveryStarted)
case .completed(.healthy):
DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailureRecoveryCompletedHealthy)
case .completed(.unhealthy):
DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailureRecoveryCompletedUnhealthy)
case .failed(let error):
DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailureRecoveryFailed, error: error)
}
}
}

Expand Down

0 comments on commit ae60548

Please sign in to comment.