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

Update VPN user agent #3302

Merged
merged 8 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10708,8 +10708,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 191.2.1;
branch = "sam/set-vpn-user-agent";
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" : "6cb645ff85948eadde86365483792d75845270fe",
"version" : "191.2.1"
"branch" : "sam/set-vpn-user-agent",
"revision" : "ee3f70eb5116b8eed14403c237b78a2afa05ec63"
}
},
{
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 All @@ -151,7 +151,7 @@
DailyPixel.fireDailyAndCount(pixel: .networkProtectionTunnelStopSuccess)
}
case .tunnelUpdateAttempt(let step):
vpnLogger.log(step, named: "Tunnel Update")

Check warning on line 154 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 @@ -318,6 +318,7 @@
}

@objc init() {
APIRequest.Headers.setUserAgent(DefaultUserAgentManager.duckDuckGoUserAgent)
samsymons marked this conversation as resolved.
Show resolved Hide resolved

let settings = VPNSettings(defaults: .networkProtectionGroupDefaults)

Expand Down
Loading