Commit 5c8e5c55 authored by Davide De Rosa's avatar Davide De Rosa
Browse files

Merge branch 'develop' into 'master'

QA: 2.6.3 Beta 1
parents c2d96310 21782cdb
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.6.2</string>
<string>2.6.3</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.6.2</string>
<string>2.6.3</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
......
......@@ -54,7 +54,7 @@ struct AppConfiguration {
static let piaDefaultConfigurationBuilder: PIATunnelProvider.ConfigurationBuilder = {
var builder = PIATunnelProvider.ConfigurationBuilder(appGroup: AppConstants.appGroup)
builder.renegotiatesAfterSeconds = piaRenegotiationInterval
builder.cipher = .aes128cbc
builder.cipher = .aes128gcm
builder.digest = .sha1
builder.handshake = .rsa2048
builder.endpointProtocols = piaAutomaticProtocols
......
......@@ -36,6 +36,8 @@ class AppPreferences {
private let defaults: UserDefaults
private var isTransitioningTheme = false
var wasLaunched: Bool {
get {
return defaults.bool(forKey: Entries.launched)
......@@ -170,7 +172,34 @@ class AppPreferences {
}
func reset() {
piaSocketType = nil
transitionTheme(to: .light)
}
// + (void)eraseForTesting;
func transitionTheme(to code: ThemeCode) {
guard !isTransitioningTheme else {
return
}
guard (code != AppPreferences.shared.currentThemeCode) else {
return
}
AppPreferences.shared.currentThemeCode = code
guard let window = UIApplication.shared.windows.first else {
fatalError("No window?")
}
isTransitioningTheme = true
UIView.animate(withDuration: AppConfiguration.Animations.duration, animations: {
window.alpha = 0.0
}, completion: { (success) in
code.apply(theme: Theme.current, reload: true)
UIView.animate(withDuration: AppConfiguration.Animations.duration) {
window.alpha = 1.0
self.isTransitioningTheme = false
}
})
}
}
......@@ -75,7 +75,7 @@ class Bootstrapper {
let defaults = Client.preferences.defaults
defaults.isPersistentConnection = true
defaults.mace = false
defaults.vpnType = IPSecProfile.vpnType
defaults.vpnType = PIATunnelProfile.vpnType
defaults.vpnCustomConfigurations = [
PIATunnelProfile.vpnType: AppConfiguration.VPN.piaDefaultConfigurationBuilder.build()
]
......@@ -107,18 +107,6 @@ class Bootstrapper {
pref.mace = false
}
// automatic
let tunnelConfiguration = pref.vpnCustomConfiguration(for: PIATunnelProfile.vpnType) as? PIATunnelProvider.Configuration
if tunnelConfiguration?.endpointProtocols.isEmpty ?? true {
AppPreferences.shared.piaSocketType = nil
var tunnelConfigurationBuilder = tunnelConfiguration?.builder()
tunnelConfigurationBuilder?.endpointProtocols = AppConfiguration.VPN.piaAutomaticProtocols
if let newConfiguration = tunnelConfigurationBuilder?.build() {
pref.setVPNCustomConfiguration(newConfiguration, for: PIATunnelProfile.vpnType)
}
}
pref.commit()
// Business objects
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.2</string>
<string>2.6.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSpokenName</key>
......
......@@ -142,8 +142,6 @@ class SettingsViewController: AutolayoutViewController {
private var isContentBlockerEnabled = false
private var isTransitioningTheme = false
// private lazy var buttonConfirm = UIBarButtonItem(
// barButtonSystemItem: .save,
// target: self,
......@@ -233,7 +231,7 @@ class SettingsViewController: AutolayoutViewController {
// XXX: no need to bufferize app preferences
@objc private func toggleDarkMode(_ sender: UISwitch) {
transitionTheme(to: sender.isOn ? .dark : .light)
AppPreferences.shared.transitionTheme(to: sender.isOn ? .dark : .light)
}
@objc private func showContentBlockerTutorial() {
......@@ -327,7 +325,7 @@ class SettingsViewController: AutolayoutViewController {
pendingOpenVPNSocketType = AppPreferences.shared.piaSocketType
pendingOpenVPNConfiguration = currentOpenVPNConfiguration.builder()
transitionTheme(to: .light)
AppPreferences.shared.reset()
redisplaySettings()
reportUpdatedPreferences()
......@@ -520,31 +518,6 @@ class SettingsViewController: AutolayoutViewController {
pendingVPNAction = pendingPreferences.requiredVPNAction()
}
private func transitionTheme(to code: ThemeCode) {
guard !isTransitioningTheme else {
return
}
guard (code != AppPreferences.shared.currentThemeCode) else {
return
}
AppPreferences.shared.currentThemeCode = code
guard let window = UIApplication.shared.windows.first else {
fatalError("No window?")
}
isTransitioningTheme = true
UIView.animate(withDuration: AppConfiguration.Animations.duration, animations: {
window.alpha = 0.0
}, completion: { (success) in
code.apply(theme: Theme.current, reload: true)
UIView.animate(withDuration: AppConfiguration.Animations.duration) {
window.alpha = 1.0
self.isTransitioningTheme = false
}
})
}
// MARK: ModalController
override func dismissModal() {
......@@ -668,6 +641,10 @@ extension SettingsViewController: UITableViewDataSource, UITableViewDelegate {
case .encryptionDigest:
cell.textLabel?.text = L10n.Settings.Encryption.Digest.title
guard !pendingOpenVPNConfiguration.isEncryptionGCM() else {
cell.detailTextLabel?.text = "GCM"
break
}
cell.detailTextLabel?.text = pendingOpenVPNConfiguration.digest.description
if !Flags.shared.enablesEncryptionSettings {
cell.accessoryType = .none
......@@ -758,8 +735,8 @@ extension SettingsViewController: UITableViewDataSource, UITableViewDelegate {
switch setting {
case .vpnProtocolSelection:
let options: [String] = [
IPSecProfile.vpnType,
PIATunnelProfile.vpnType
PIATunnelProfile.vpnType,
IPSecProfile.vpnType
]
controller = OptionsViewController()
controller?.options = options
......@@ -791,6 +768,8 @@ extension SettingsViewController: UITableViewDataSource, UITableViewDelegate {
break
}
let options: [PIATunnelProvider.Cipher] = [
.aes128gcm,
.aes256gcm,
.aes128cbc,
.aes256cbc
]
......@@ -802,6 +781,9 @@ extension SettingsViewController: UITableViewDataSource, UITableViewDelegate {
guard Flags.shared.enablesEncryptionSettings else {
break
}
guard !pendingOpenVPNConfiguration.isEncryptionGCM() else {
break
}
let options: [PIATunnelProvider.Digest] = [
.sha1,
.sha256
......@@ -819,6 +801,7 @@ extension SettingsViewController: UITableViewDataSource, UITableViewDelegate {
.rsa3072,
.rsa4096,
.ecc256r1,
.ecc256k1,
.ecc521r1
]
controller = OptionsViewController()
......@@ -1055,4 +1038,8 @@ private extension PIATunnelProvider.ConfigurationBuilder {
}
return port
}
func isEncryptionGCM() -> Bool {
return (cipher == .aes128gcm) || (cipher == .aes256gcm)
}
}
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.2</string>
<string>2.6.3</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.2</string>
<string>2.6.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -68,8 +68,8 @@ end
def tunnel_pods
#tunnel_by_path('..')
#tunnel_by_git('bf89991')
tunnel_by_version('~> 1.1.4')
tunnel_by_git('bc08896')
#tunnel_by_version('~> 1.1.4')
end
# Targets
......
PODS:
- Alamofire (4.7.2)
- Alamofire (4.7.3)
- AlamofireImage (3.3.1):
- Alamofire (~> 4.5)
- FXPageControl (1.5)
......@@ -29,13 +29,13 @@ PODS:
- PIALibrary/VPN (1.1.3):
- PIALibrary/Library
- PIATunnel (~> 1.1.3)
- PIATunnel (1.1.5):
- PIATunnel/AppExtension (= 1.1.5)
- PIATunnel/Core (= 1.1.5)
- PIATunnel/AppExtension (1.1.5):
- PIATunnel (1.1.6):
- PIATunnel/AppExtension (= 1.1.6)
- PIATunnel/Core (= 1.1.6)
- PIATunnel/AppExtension (1.1.6):
- PIATunnel/Core
- SwiftyBeaver
- PIATunnel/Core (1.1.5):
- PIATunnel/Core (1.1.6):
- OpenSSL-Apple (~> 1.1.0h)
- SwiftyBeaver
- ReachabilitySwift (4.1.0)
......@@ -53,7 +53,7 @@ DEPENDENCIES:
- PIALibrary/Mock (~> 1.1.3)
- PIALibrary/UI (~> 1.1.3)
- PIALibrary/VPN (~> 1.1.3)
- PIATunnel (~> 1.1.4)
- PIATunnel (from `https://github.com/pia-foss/tunnel-apple`, commit `bc08896`)
- SideMenu (= 3.1.5)
- TPKeyboardAvoiding
......@@ -68,14 +68,23 @@ SPEC REPOS:
- MBProgressHUD
- OpenSSL-Apple
- PIALibrary
- PIATunnel
- ReachabilitySwift
- SideMenu
- SwiftyBeaver
- TPKeyboardAvoiding
EXTERNAL SOURCES:
PIATunnel:
:commit: bc08896
:git: https://github.com/pia-foss/tunnel-apple
CHECKOUT OPTIONS:
PIATunnel:
:commit: bc08896
:git: https://github.com/pia-foss/tunnel-apple
SPEC CHECKSUMS:
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
AlamofireImage: 3b35b586853abaf94ca1250f4e94cff3c21a4c0d
FXPageControl: 97620412515365d10a3282ec0660f49f6401a8f0
Gloss: 1e8743f8de1fbe14a97f220ff901cba91ae5f8f8
......@@ -84,12 +93,12 @@ SPEC CHECKSUMS:
MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
OpenSSL-Apple: cd153d705ef350eb834ae7ff5f21f792b51ed208
PIALibrary: 17021e8f1add3aa5a19dcb0ac42844beb5286229
PIATunnel: b3e3f9a64a9218dd1185538d1939b149b0268543
PIATunnel: d9bff9429fd66ed33cb2f5fea53401697cb2ce05
ReachabilitySwift: 6849231cd4e06559f3b9ef4a97a0a0f96d41e09f
SideMenu: 47dbf9e4d878062d8994aed43f6e4bf6c1fea30b
SwiftyBeaver: e45759613e50b522b0e6f53b1f0f14389b45ca34
TPKeyboardAvoiding: cb69d5ddbe90ce0170e4bc2db1e5e41d4a3ad9a4
PODFILE CHECKSUM: 10dcb0beaaa7da047a50b35ddb8ee34234ce39c2
PODFILE CHECKSUM: 9c79b825aa56fa1a4f7d2350abf351626b51bc40
COCOAPODS: 1.5.3
Build 9286:
- Fixed potential logout on upgrade.
Build 9275:
- Added "Automatic" OpenVPN socket type.
Build 9262:
- Mitigated on iOS 12 bug affecting OpenVPN UDP (reported to Apple).
- Optimized download speed.
- IPv4 address is now used in case of DNS failure.
- Automatic port now tries all available ports in sequence.
- Added GCM encryption ciphers to OpenVPN.
- Added ECC-256k1 handshake certificate to OpenVPN.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment