-
Notifications
You must be signed in to change notification settings - Fork 15
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
PIA-1291: Make wireguard the default option #28
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -307,6 +307,12 @@ extension Client { | |
allMaps[vpnType] = customConfiguration.serialized() | ||
accessedDatabase.plain.vpnCustomConfigurationMaps = allMaps | ||
} | ||
|
||
#if os(iOS) | ||
public func setVpnTypeToWireguard() { | ||
self.vpnType = PIAWGTunnelProfile.vpnType | ||
} | ||
kp-laura-sempere marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#endif | ||
|
||
/// The `String` array of available WiFi networks | ||
public fileprivate(set) var availableNetworks: [String] { | ||
|
@@ -399,6 +405,16 @@ extension Client { | |
accessedDatabase.plain.timeToConnectVPN = newValue | ||
} | ||
} | ||
|
||
/// Store a bool that represents whether we already attempted to migrate to wireguard | ||
public var wireguardMigrationPerformed: Bool { | ||
get { | ||
return accessedDatabase.plain.wireguardMigrationPerformed | ||
} | ||
set { | ||
accessedDatabase.plain.wireguardMigrationPerformed = newValue | ||
} | ||
} | ||
|
||
/// Store a bool that represents the status of leak protection property | ||
public var leakProtection: Bool { | ||
|
@@ -481,7 +497,15 @@ extension Client.Preferences { | |
useWiFiProtection = true | ||
trustCellularData = false | ||
nmtMigrationSuccess = false | ||
|
||
#if os(iOS) | ||
vpnType = PIAWGTunnelProfile.vpnType | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as the other comments: for tvOS we still want IKEv2 to be the default There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to also have all references to PIAWGTunnelProfile inside the iOS condition since this class is not available on tvOS otherwise it won't compile on tvOS |
||
#endif | ||
|
||
#if os(tvOS) | ||
vpnType = IKEv2Profile.vpnType | ||
#endif | ||
|
||
vpnDisconnectsOnSleep = false | ||
vpnCustomConfigurations = [:] | ||
availableNetworks = [] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we apply this update only when the platform is not tvOS?