aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp
diff options
context:
space:
mode:
Diffstat (limited to 'Sources/WireGuardApp')
-rw-r--r--Sources/WireGuardApp/Base.lproj/InfoPlist.strings2
-rw-r--r--Sources/WireGuardApp/Base.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/Config/Version.xcconfig4
-rw-r--r--Sources/WireGuardApp/LocalizationHelper.swift2
-rw-r--r--Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift6
-rw-r--r--Sources/WireGuardApp/Tunnel/MockTunnels.swift2
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelConfiguration+UapiConfig.swift2
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelErrors.swift2
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelStatus.swift2
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelsManager.swift42
-rw-r--r--Sources/WireGuardApp/UI/ActivateOnDemandViewModel.swift2
-rw-r--r--Sources/WireGuardApp/UI/ErrorPresenterProtocol.swift2
-rw-r--r--Sources/WireGuardApp/UI/LogViewHelper.swift2
-rw-r--r--Sources/WireGuardApp/UI/PrivateDataConfirmation.swift2
-rw-r--r--Sources/WireGuardApp/UI/TunnelImporter.swift2
-rw-r--r--Sources/WireGuardApp/UI/TunnelViewModel.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/AppDelegate.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ConfirmationAlertPresenter.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ErrorPresenter.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/QuickActionItem.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/RecentTunnelsTracker.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift28
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TextCell.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift14
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/LogViewController.swift32
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/MainViewController.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/QRScanViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionDetailTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift27
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/TunnelsListTableViewController.swift20
-rw-r--r--Sources/WireGuardApp/UI/macOS/AppDelegate.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/Application.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/Info.plist2
-rw-r--r--Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist2
-rw-r--r--Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m34
-rw-r--r--Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/StatusItemController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/StatusMenu.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/highlighter.c2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/highlighter.h2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift2
-rw-r--r--Sources/WireGuardApp/WireGuardAppError.swift2
-rw-r--r--Sources/WireGuardApp/WireGuardResult.swift2
-rw-r--r--Sources/WireGuardApp/ZipArchive/ZipArchive.swift2
-rw-r--r--Sources/WireGuardApp/ZipArchive/ZipExporter.swift2
-rw-r--r--Sources/WireGuardApp/ZipArchive/ZipImporter.swift2
-rw-r--r--Sources/WireGuardApp/de.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/es.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/fa.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/fi.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/fr.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/id.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/it.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/ja.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/ko.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/pa.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/pl.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/ro.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/ru.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/sl.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/tr.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings2
96 files changed, 164 insertions, 241 deletions
diff --git a/Sources/WireGuardApp/Base.lproj/InfoPlist.strings b/Sources/WireGuardApp/Base.lproj/InfoPlist.strings
index 2a7c6d7..5dd93ac 100644
--- a/Sources/WireGuardApp/Base.lproj/InfoPlist.strings
+++ b/Sources/WireGuardApp/Base.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// iOS permission prompts
diff --git a/Sources/WireGuardApp/Base.lproj/Localizable.strings b/Sources/WireGuardApp/Base.lproj/Localizable.strings
index 40023ec..f181953 100644
--- a/Sources/WireGuardApp/Base.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/Base.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/Config/Version.xcconfig b/Sources/WireGuardApp/Config/Version.xcconfig
index a8ce1af..8f1ad96 100644
--- a/Sources/WireGuardApp/Config/Version.xcconfig
+++ b/Sources/WireGuardApp/Config/Version.xcconfig
@@ -1,2 +1,2 @@
-VERSION_NAME = 1.0.15
-VERSION_ID = 26
+VERSION_NAME = 1.0.16
+VERSION_ID = 27
diff --git a/Sources/WireGuardApp/LocalizationHelper.swift b/Sources/WireGuardApp/LocalizationHelper.swift
index 0f22acb..fcf13a9 100644
--- a/Sources/WireGuardApp/LocalizationHelper.swift
+++ b/Sources/WireGuardApp/LocalizationHelper.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift b/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
index 9ba605a..fb9d218 100644
--- a/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
+++ b/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import NetworkExtension
@@ -42,9 +42,7 @@ extension ActivateOnDemandOption {
}
}
tunnelProviderManager.onDemandRules = rules
- let status = tunnelProviderManager.connection.status
- let isActive = status == .connected || status == .connecting
- tunnelProviderManager.isOnDemandEnabled = (rules != nil) && (tunnelProviderManager.isOnDemandEnabled || isActive)
+ tunnelProviderManager.isOnDemandEnabled = (rules != nil) && tunnelProviderManager.isOnDemandEnabled
}
init(from tunnelProviderManager: NETunnelProviderManager) {
diff --git a/Sources/WireGuardApp/Tunnel/MockTunnels.swift b/Sources/WireGuardApp/Tunnel/MockTunnels.swift
index 15fe1c2..1a6e2ba 100644
--- a/Sources/WireGuardApp/Tunnel/MockTunnels.swift
+++ b/Sources/WireGuardApp/Tunnel/MockTunnels.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import NetworkExtension
diff --git a/Sources/WireGuardApp/Tunnel/TunnelConfiguration+UapiConfig.swift b/Sources/WireGuardApp/Tunnel/TunnelConfiguration+UapiConfig.swift
index cdc81ce..ac45c81 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelConfiguration+UapiConfig.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelConfiguration+UapiConfig.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/Tunnel/TunnelErrors.swift b/Sources/WireGuardApp/Tunnel/TunnelErrors.swift
index 7031646..854e189 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelErrors.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelErrors.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import NetworkExtension
diff --git a/Sources/WireGuardApp/Tunnel/TunnelStatus.swift b/Sources/WireGuardApp/Tunnel/TunnelStatus.swift
index 3d4a408..581b8f8 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelStatus.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelStatus.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
import NetworkExtension
diff --git a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
index 72aaf7c..c277f6d 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
import NetworkExtension
@@ -206,7 +206,10 @@ class TunnelsManager {
}
}
- func modify(tunnel: TunnelContainer, tunnelConfiguration: TunnelConfiguration, onDemandOption: ActivateOnDemandOption, completionHandler: @escaping (TunnelsManagerError?) -> Void) {
+ func modify(tunnel: TunnelContainer, tunnelConfiguration: TunnelConfiguration,
+ onDemandOption: ActivateOnDemandOption,
+ shouldEnsureOnDemandEnabled: Bool = false,
+ completionHandler: @escaping (TunnelsManagerError?) -> Void) {
let tunnelName = tunnelConfiguration.name ?? ""
if tunnelName.isEmpty {
completionHandler(TunnelsManagerError.tunnelNameEmpty)
@@ -214,6 +217,20 @@ class TunnelsManager {
}
let tunnelProviderManager = tunnel.tunnelProvider
+
+ let isIntroducingOnDemandRules = (tunnelProviderManager.onDemandRules ?? []).isEmpty && onDemandOption != .off
+ if isIntroducingOnDemandRules && tunnel.status != .inactive && tunnel.status != .deactivating {
+ tunnel.onDeactivated = { [weak self] in
+ self?.modify(tunnel: tunnel, tunnelConfiguration: tunnelConfiguration,
+ onDemandOption: onDemandOption, shouldEnsureOnDemandEnabled: true,
+ completionHandler: completionHandler)
+ }
+ self.startDeactivation(of: tunnel)
+ return
+ } else {
+ tunnel.onDeactivated = nil
+ }
+
let oldName = tunnelProviderManager.localizedDescription ?? ""
let isNameChanged = tunnelName != oldName
if isNameChanged {
@@ -231,10 +248,11 @@ class TunnelsManager {
}
tunnelProviderManager.isEnabled = true
- let wasOnDemandEnabled = tunnelProviderManager.isOnDemandEnabled
- let isIntroducingOnDemandRules = (tunnelProviderManager.onDemandRules ?? []).isEmpty && onDemandOption != .off
+ let isActivatingOnDemand = !tunnelProviderManager.isOnDemandEnabled && shouldEnsureOnDemandEnabled
onDemandOption.apply(on: tunnelProviderManager)
- let isActivatingOnDemand = !wasOnDemandEnabled && tunnelProviderManager.isOnDemandEnabled
+ if shouldEnsureOnDemandEnabled {
+ tunnelProviderManager.isOnDemandEnabled = true
+ }
tunnelProviderManager.saveToPreferences { [weak self] error in
if let error = error {
@@ -266,11 +284,8 @@ class TunnelsManager {
if isActivatingOnDemand {
// Reload tunnel after saving.
// Without this, the tunnel stopes getting updates on the tunnel status from iOS.
- tunnelProviderManager.loadFromPreferences { [weak self] error in
+ tunnelProviderManager.loadFromPreferences { error in
tunnel.isActivateOnDemandEnabled = tunnelProviderManager.isOnDemandEnabled
- if isIntroducingOnDemandRules {
- self?.startDeactivation(of: tunnel)
- }
if let error = error {
wg_log(.error, message: "Modify: Re-loading after saving configuration failed: \(error)")
completionHandler(TunnelsManagerError.systemErrorOnModifyTunnel(systemError: error))
@@ -279,9 +294,6 @@ class TunnelsManager {
}
}
} else {
- if isIntroducingOnDemandRules {
- self.startDeactivation(of: tunnel)
- }
completionHandler(nil)
}
}
@@ -507,6 +519,11 @@ class TunnelsManager {
}
}
+ if session.status == .disconnected {
+ tunnel.onDeactivated?()
+ tunnel.onDeactivated = nil
+ }
+
if tunnel.status == .restarting && session.status == .disconnected {
tunnel.startActivation(activationDelegate: self.activationDelegate)
return
@@ -577,6 +594,7 @@ class TunnelContainer: NSObject {
var activationAttemptId: String?
var activationTimer: Timer?
var deactivationTimer: Timer?
+ var onDeactivated: (() -> Void)?
fileprivate var tunnelProvider: NETunnelProviderManager {
didSet {
diff --git a/Sources/WireGuardApp/UI/ActivateOnDemandViewModel.swift b/Sources/WireGuardApp/UI/ActivateOnDemandViewModel.swift
index 7ddb215..b075d55 100644
--- a/Sources/WireGuardApp/UI/ActivateOnDemandViewModel.swift
+++ b/Sources/WireGuardApp/UI/ActivateOnDemandViewModel.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/UI/ErrorPresenterProtocol.swift b/Sources/WireGuardApp/UI/ErrorPresenterProtocol.swift
index aed2149..4368e7d 100644
--- a/Sources/WireGuardApp/UI/ErrorPresenterProtocol.swift
+++ b/Sources/WireGuardApp/UI/ErrorPresenterProtocol.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
protocol ErrorPresenterProtocol {
static func showErrorAlert(title: String, message: String, from sourceVC: AnyObject?, onPresented: (() -> Void)?, onDismissal: (() -> Void)?)
diff --git a/Sources/WireGuardApp/UI/LogViewHelper.swift b/Sources/WireGuardApp/UI/LogViewHelper.swift
index 0b97b8f..eb5c9da 100644
--- a/Sources/WireGuardApp/UI/LogViewHelper.swift
+++ b/Sources/WireGuardApp/UI/LogViewHelper.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/UI/PrivateDataConfirmation.swift b/Sources/WireGuardApp/UI/PrivateDataConfirmation.swift
index 4b134a3..dd869b5 100644
--- a/Sources/WireGuardApp/UI/PrivateDataConfirmation.swift
+++ b/Sources/WireGuardApp/UI/PrivateDataConfirmation.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
import LocalAuthentication
diff --git a/Sources/WireGuardApp/UI/TunnelImporter.swift b/Sources/WireGuardApp/UI/TunnelImporter.swift
index 4691582..65349bc 100644
--- a/Sources/WireGuardApp/UI/TunnelImporter.swift
+++ b/Sources/WireGuardApp/UI/TunnelImporter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/UI/TunnelViewModel.swift b/Sources/WireGuardApp/UI/TunnelViewModel.swift
index b65c8cc..195c47a 100644
--- a/Sources/WireGuardApp/UI/TunnelViewModel.swift
+++ b/Sources/WireGuardApp/UI/TunnelViewModel.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/UI/iOS/AppDelegate.swift b/Sources/WireGuardApp/UI/iOS/AppDelegate.swift
index 4ab3b30..fbb09c7 100644
--- a/Sources/WireGuardApp/UI/iOS/AppDelegate.swift
+++ b/Sources/WireGuardApp/UI/iOS/AppDelegate.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
import os.log
diff --git a/Sources/WireGuardApp/UI/iOS/ConfirmationAlertPresenter.swift b/Sources/WireGuardApp/UI/iOS/ConfirmationAlertPresenter.swift
index 824a0a5..add648b 100644
--- a/Sources/WireGuardApp/UI/iOS/ConfirmationAlertPresenter.swift
+++ b/Sources/WireGuardApp/UI/iOS/ConfirmationAlertPresenter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/ErrorPresenter.swift b/Sources/WireGuardApp/UI/iOS/ErrorPresenter.swift
index 5dd505b..6961ac1 100644
--- a/Sources/WireGuardApp/UI/iOS/ErrorPresenter.swift
+++ b/Sources/WireGuardApp/UI/iOS/ErrorPresenter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
import os.log
diff --git a/Sources/WireGuardApp/UI/iOS/QuickActionItem.swift b/Sources/WireGuardApp/UI/iOS/QuickActionItem.swift
index f41d8a0..587e31f 100644
--- a/Sources/WireGuardApp/UI/iOS/QuickActionItem.swift
+++ b/Sources/WireGuardApp/UI/iOS/QuickActionItem.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/RecentTunnelsTracker.swift b/Sources/WireGuardApp/UI/iOS/RecentTunnelsTracker.swift
index ddc5ca9..f9bf813 100644
--- a/Sources/WireGuardApp/UI/iOS/RecentTunnelsTracker.swift
+++ b/Sources/WireGuardApp/UI/iOS/RecentTunnelsTracker.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift b/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift
index dc981d2..217a3ca 100644
--- a/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift
+++ b/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift b/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift
index f8f373a..6f9d55c 100644
--- a/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift b/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift
index 1d9912d..ae7a144 100644
--- a/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift b/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift
index 34eb0df..fedef53 100644
--- a/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift b/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift
index 30256a0..0429fb9 100644
--- a/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift b/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift
index d84d23e..e065b4f 100644
--- a/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift b/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
index e8c3850..ab1a71f 100644
--- a/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -9,11 +9,7 @@ class KeyValueCell: UITableViewCell {
let keyLabel = UILabel()
keyLabel.font = UIFont.preferredFont(forTextStyle: .body)
keyLabel.adjustsFontForContentSizeCategory = true
- if #available(iOS 13.0, *) {
- keyLabel.textColor = .label
- } else {
- keyLabel.textColor = .black
- }
+ keyLabel.textColor = .label
keyLabel.textAlignment = .left
return keyLabel
}()
@@ -35,11 +31,7 @@ class KeyValueCell: UITableViewCell {
valueTextField.autocapitalizationType = .none
valueTextField.autocorrectionType = .no
valueTextField.spellCheckingType = .no
- if #available(iOS 13.0, *) {
- valueTextField.textColor = .secondaryLabel
- } else {
- valueTextField.textColor = .gray
- }
+ valueTextField.textColor = .secondaryLabel
return valueTextField
}()
@@ -64,18 +56,10 @@ class KeyValueCell: UITableViewCell {
var isValueValid = true {
didSet {
- if #available(iOS 13.0, *) {
- if isValueValid {
- keyLabel.textColor = .label
- } else {
- keyLabel.textColor = .systemRed
- }
+ if isValueValid {
+ keyLabel.textColor = .label
} else {
- if isValueValid {
- keyLabel.textColor = .black
- } else {
- keyLabel.textColor = .red
- }
+ keyLabel.textColor = .systemRed
}
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift b/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift
index 3952ffd..4bedbba 100644
--- a/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -16,11 +16,7 @@ class SwitchCell: UITableViewCell {
get { return switchView.isEnabled }
set(value) {
switchView.isEnabled = value
- if #available(iOS 13.0, *) {
- textLabel?.textColor = value ? .label : .secondaryLabel
- } else {
- textLabel?.textColor = value ? .black : .gray
- }
+ textLabel?.textColor = value ? .label : .secondaryLabel
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/View/TextCell.swift b/Sources/WireGuardApp/UI/iOS/View/TextCell.swift
index 9de5012..3024b46 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TextCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TextCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -28,11 +28,7 @@ class TextCell: UITableViewCell {
override func prepareForReuse() {
super.prepareForReuse()
message = ""
- if #available(iOS 13.0, *) {
- setTextColor(.label)
- } else {
- setTextColor(.black)
- }
+ setTextColor(.label)
setTextAlignment(.left)
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift b/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift
index ac6f063..d151402 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -30,11 +30,7 @@ class TunnelEditEditableKeyValueCell: TunnelEditKeyValueCell {
super.init(style: style, reuseIdentifier: reuseIdentifier)
copyableGesture = false
- if #available(iOS 13.0, *) {
- valueTextField.textColor = .label
- } else {
- valueTextField.textColor = .black
- }
+ valueTextField.textColor = .label
valueTextField.isEnabled = true
valueLabelScrollView.isScrollEnabled = false
valueTextField.widthAnchor.constraint(equalTo: valueLabelScrollView.widthAnchor).isActive = true
diff --git a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
index 4dbe97c..71ee6d8 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -41,21 +41,13 @@ class TunnelListCell: UITableViewCell {
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.adjustsFontForContentSizeCategory = true
label.numberOfLines = 1
- if #available(iOS 13.0, *) {
- label.textColor = .secondaryLabel
- } else {
- label.textColor = .gray
- }
+ label.textColor = .secondaryLabel
return label
}()
let busyIndicator: UIActivityIndicatorView = {
let busyIndicator: UIActivityIndicatorView
- if #available(iOS 13.0, *) {
- busyIndicator = UIActivityIndicatorView(style: .medium)
- } else {
- busyIndicator = UIActivityIndicatorView(style: .gray)
- }
+ busyIndicator = UIActivityIndicatorView(style: .medium)
busyIndicator.hidesWhenStopped = true
return busyIndicator
}()
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/LogViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/LogViewController.swift
index eed5e46..2398919 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/LogViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/LogViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -15,15 +15,9 @@ class LogViewController: UIViewController {
}()
let busyIndicator: UIActivityIndicatorView = {
- if #available(iOS 13.0, *) {
- let busyIndicator = UIActivityIndicatorView(style: .medium)
- busyIndicator.hidesWhenStopped = true
- return busyIndicator
- } else {
- let busyIndicator = UIActivityIndicatorView(style: .gray)
- busyIndicator.hidesWhenStopped = true
- return busyIndicator
- }
+ let busyIndicator = UIActivityIndicatorView(style: .medium)
+ busyIndicator.hidesWhenStopped = true
+ return busyIndicator
}()
let paragraphStyle: NSParagraphStyle = {
@@ -41,12 +35,7 @@ class LogViewController: UIViewController {
override func loadView() {
view = UIView()
- if #available(iOS 13.0, *) {
- view.backgroundColor = .systemBackground
- } else {
- view.backgroundColor = .white
- }
-
+ view.backgroundColor = .systemBackground
view.addSubview(textView)
textView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
@@ -92,15 +81,8 @@ class LogViewController: UIViewController {
let bodyFont = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.body)
let captionFont = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.caption1)
for logEntry in fetchedLogEntries {
- var bgColor: UIColor
- var fgColor: UIColor
- if #available(iOS 13.0, *) {
- bgColor = self.isNextLineHighlighted ? .systemGray3 : .systemBackground
- fgColor = .label
- } else {
- bgColor = self.isNextLineHighlighted ? UIColor(white: 0.88, alpha: 1.0) : UIColor.white
- fgColor = .black
- }
+ let bgColor: UIColor = self.isNextLineHighlighted ? .systemGray3 : .systemBackground
+ let fgColor: UIColor = .label
let timestampText = NSAttributedString(string: logEntry.timestamp + "\n", attributes: [.font: captionFont, .backgroundColor: bgColor, .foregroundColor: fgColor, .paragraphStyle: self.paragraphStyle])
let messageText = NSAttributedString(string: logEntry.message + "\n", attributes: [.font: bodyFont, .backgroundColor: bgColor, .foregroundColor: fgColor, .paragraphStyle: self.paragraphStyle])
richText.append(timestampText)
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/MainViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/MainViewController.swift
index b780517..8542296 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/MainViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/MainViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -11,11 +11,7 @@ class MainViewController: UISplitViewController {
init() {
let detailVC = UIViewController()
- if #available(iOS 13.0, *) {
- detailVC.view.backgroundColor = .systemBackground
- } else {
- detailVC.view.backgroundColor = .white
- }
+ detailVC.view.backgroundColor = .systemBackground
let detailNC = UINavigationController(rootViewController: detailVC)
let masterVC = TunnelsListTableViewController()
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/QRScanViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/QRScanViewController.swift
index 4be0d67..cb297a6 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/QRScanViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/QRScanViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import AVFoundation
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionDetailTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionDetailTableViewController.swift
index d315e2f..4211560 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionDetailTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionDetailTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
index d32fa8c..ef9a88c 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
import SystemConfiguration.CaptiveNetwork
@@ -185,11 +185,7 @@ extension SSIDOptionEditTableViewController {
private func noSSIDsCell(for tableView: UITableView, at indexPath: IndexPath) -> UITableViewCell {
let cell: TextCell = tableView.dequeueReusableCell(for: indexPath)
cell.message = tr("tunnelOnDemandNoSSIDs")
- if #available(iOS 13.0, *) {
- cell.setTextColor(.secondaryLabel)
- } else {
- cell.setTextColor(.gray)
- }
+ cell.setTextColor(.secondaryLabel)
cell.setTextAlignment(.center)
return cell
}
@@ -268,23 +264,8 @@ extension SSIDOptionEditTableViewController {
#if targetEnvironment(simulator)
completionHandler("Simulator Wi-Fi")
#else
- if #available(iOS 14, *) {
- NEHotspotNetwork.fetchCurrent { hotspotNetwork in
- completionHandler(hotspotNetwork?.ssid)
- }
- } else {
- if let supportedInterfaces = CNCopySupportedInterfaces() as? [CFString] {
- for interface in supportedInterfaces {
- if let networkInfo = CNCopyCurrentNetworkInfo(interface) {
- if let ssid = (networkInfo as NSDictionary)[kCNNetworkInfoKeySSID as String] as? String {
- completionHandler(!ssid.isEmpty ? ssid : nil)
- return
- }
- }
- }
- }
-
- completionHandler(nil)
+ NEHotspotNetwork.fetchCurrent { hotspotNetwork in
+ completionHandler(hotspotNetwork?.ssid)
}
#endif
}
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift
index afec4b0..483b779 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
import os.log
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
index 196de0c..509d123 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
index e44cf8d..dfb35c6 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelsListTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelsListTableViewController.swift
index 85e64ce..4486151 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelsListTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelsListTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
import MobileCoreServices
@@ -33,11 +33,7 @@ class TunnelsListTableViewController: UIViewController {
let busyIndicator: UIActivityIndicatorView = {
let busyIndicator: UIActivityIndicatorView
- if #available(iOS 13.0, *) {
- busyIndicator = UIActivityIndicatorView(style: .medium)
- } else {
- busyIndicator = UIActivityIndicatorView(style: .gray)
- }
+ busyIndicator = UIActivityIndicatorView(style: .medium)
busyIndicator.hidesWhenStopped = true
return busyIndicator
}()
@@ -51,11 +47,7 @@ class TunnelsListTableViewController: UIViewController {
override func loadView() {
view = UIView()
- if #available(iOS 13.0, *) {
- view.backgroundColor = .systemBackground
- } else {
- view.backgroundColor = .white
- }
+ view.backgroundColor = .systemBackground
tableView.dataSource = self
tableView.delegate = self
@@ -406,11 +398,7 @@ extension TunnelsListTableViewController: TunnelsManagerListDelegate {
(splitViewController.viewControllers[0] as? UINavigationController)?.popToRootViewController(animated: false)
} else {
let detailVC = UIViewController()
- if #available(iOS 13.0, *) {
- detailVC.view.backgroundColor = .systemBackground
- } else {
- detailVC.view.backgroundColor = .white
- }
+ detailVC.view.backgroundColor = .systemBackground
let detailNC = UINavigationController(rootViewController: detailVC)
splitViewController.showDetailViewController(detailNC, sender: self)
}
diff --git a/Sources/WireGuardApp/UI/macOS/AppDelegate.swift b/Sources/WireGuardApp/UI/macOS/AppDelegate.swift
index f1ed4cd..1dda3e6 100644
--- a/Sources/WireGuardApp/UI/macOS/AppDelegate.swift
+++ b/Sources/WireGuardApp/UI/macOS/AppDelegate.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
import ServiceManagement
diff --git a/Sources/WireGuardApp/UI/macOS/Application.swift b/Sources/WireGuardApp/UI/macOS/Application.swift
index 67d67a7..261ee8a 100644
--- a/Sources/WireGuardApp/UI/macOS/Application.swift
+++ b/Sources/WireGuardApp/UI/macOS/Application.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift b/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift
index 71157db..dbab027 100644
--- a/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift
+++ b/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift b/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift
index c236e08..b10aa88 100644
--- a/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift
+++ b/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/Info.plist b/Sources/WireGuardApp/UI/macOS/Info.plist
index 3211fe6..a405138 100644
--- a/Sources/WireGuardApp/UI/macOS/Info.plist
+++ b/Sources/WireGuardApp/UI/macOS/Info.plist
@@ -29,7 +29,7 @@
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
- <string>Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.</string>
+ <string>Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.</string>
<key>NSPrincipalClass</key>
<string>WireGuard.Application</string>
<key>LSApplicationCategoryType</key>
diff --git a/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift b/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift
index 94faa57..158e464 100644
--- a/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift
+++ b/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist
index 516eafd..185de16 100644
--- a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist
+++ b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist
@@ -25,7 +25,7 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.</string>
+ <string>Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSBackgroundOnly</key>
diff --git a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m
index 1c37daf..f8a0535 100644
--- a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m
+++ b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
#import <Cocoa/Cocoa.h>
@@ -14,23 +14,19 @@ int main(int argc, char *argv[])
return 2;
uint64_t now = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
if (![[NSData dataWithBytes:&now length:sizeof(now)] writeToURL:[containerUrl URLByAppendingPathComponent:@"login-helper-timestamp.bin"] atomically:YES])
- return 3;
- if (@available(macOS 10.15, *)) {
- NSCondition *condition = [[NSCondition alloc] init];
- NSURL *appURL = [NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:appId];
- if (!appURL)
- return 4;
- NSWorkspaceOpenConfiguration *openConfiguration = [NSWorkspaceOpenConfiguration configuration];
- openConfiguration.activates = NO;
- openConfiguration.addsToRecentItems = NO;
- openConfiguration.hides = YES;
- [NSWorkspace.sharedWorkspace openApplicationAtURL:appURL configuration:openConfiguration completionHandler:^(NSRunningApplication * _Nullable app, NSError * _Nullable error) {
- [condition signal];
- }];
- [condition wait];
- } else {
- [NSWorkspace.sharedWorkspace launchAppWithBundleIdentifier:appId options:NSWorkspaceLaunchWithoutActivation
- additionalEventParamDescriptor:NULL launchIdentifier:NULL];
- }
+ return 3;
+
+ NSCondition *condition = [[NSCondition alloc] init];
+ NSURL *appURL = [NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:appId];
+ if (!appURL)
+ return 4;
+ NSWorkspaceOpenConfiguration *openConfiguration = [NSWorkspaceOpenConfiguration configuration];
+ openConfiguration.activates = NO;
+ openConfiguration.addsToRecentItems = NO;
+ openConfiguration.hides = YES;
+ [NSWorkspace.sharedWorkspace openApplicationAtURL:appURL configuration:openConfiguration completionHandler:^(NSRunningApplication * _Nullable app, NSError * _Nullable error) {
+ [condition signal];
+ }];
+ [condition wait];
return 0;
}
diff --git a/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift b/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift
index bcbe28f..89c5b53 100644
--- a/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift
+++ b/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift b/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift
index b77e82e..255cc64 100644
--- a/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift
+++ b/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import AppKit
diff --git a/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift b/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift
index bdf55ab..ceb3df1 100644
--- a/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift
+++ b/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift b/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift
index 96da524..7527d7d 100644
--- a/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift
+++ b/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/StatusItemController.swift b/Sources/WireGuardApp/UI/macOS/StatusItemController.swift
index 19723cb..3088574 100644
--- a/Sources/WireGuardApp/UI/macOS/StatusItemController.swift
+++ b/Sources/WireGuardApp/UI/macOS/StatusItemController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/StatusMenu.swift b/Sources/WireGuardApp/UI/macOS/StatusMenu.swift
index 6cd00a4..45d2283 100644
--- a/Sources/WireGuardApp/UI/macOS/StatusMenu.swift
+++ b/Sources/WireGuardApp/UI/macOS/StatusMenu.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift b/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift
index 86cfaa6..0ab59ee 100644
--- a/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift
+++ b/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift b/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift
index 2165f1f..98e4d49 100644
--- a/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift
index db1bcae..d08503a 100644
--- a/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift
index 274a137..574859d 100644
--- a/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift
index 5d3f3cf..eafaf12 100644
--- a/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift b/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift
index e5ffd31..59cc556 100644
--- a/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift b/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift
index 805ea89..2ce31a6 100644
--- a/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift b/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift
index 1869c81..50eb2bd 100644
--- a/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift b/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift
index 4630d7d..fb9ff35 100644
--- a/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
import CoreWLAN
diff --git a/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift b/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift
index 57b08cc..9f844b1 100644
--- a/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/View/highlighter.c b/Sources/WireGuardApp/UI/macOS/View/highlighter.c
index d89feda..625b7e0 100644
--- a/Sources/WireGuardApp/UI/macOS/View/highlighter.c
+++ b/Sources/WireGuardApp/UI/macOS/View/highlighter.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: MIT
/*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
diff --git a/Sources/WireGuardApp/UI/macOS/View/highlighter.h b/Sources/WireGuardApp/UI/macOS/View/highlighter.h
index 885db2d..8b86acb 100644
--- a/Sources/WireGuardApp/UI/macOS/View/highlighter.h
+++ b/Sources/WireGuardApp/UI/macOS/View/highlighter.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: MIT */
/*
* Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift
index 7989bda..bd0d5e5 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift
index 986eaa3..14fc776 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift
index 1653ab8..88eb8be 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift
index 6ad8cf3..41d2b15 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift
index c1f7c74..851498a 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift
index 7c94dbb..a6cc5c5 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift
index cc7ab8c..9e49cc3 100644
--- a/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift
+++ b/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Cocoa
diff --git a/Sources/WireGuardApp/WireGuardAppError.swift b/Sources/WireGuardApp/WireGuardAppError.swift
index a461909..e02ba5f 100644
--- a/Sources/WireGuardApp/WireGuardAppError.swift
+++ b/Sources/WireGuardApp/WireGuardAppError.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
protocol WireGuardAppError: Error {
typealias AlertText = (title: String, message: String)
diff --git a/Sources/WireGuardApp/WireGuardResult.swift b/Sources/WireGuardApp/WireGuardResult.swift
index f6c9a4c..fb6d5ea 100644
--- a/Sources/WireGuardApp/WireGuardResult.swift
+++ b/Sources/WireGuardApp/WireGuardResult.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
enum WireGuardResult<T> {
case success(_ value: T)
diff --git a/Sources/WireGuardApp/ZipArchive/ZipArchive.swift b/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
index 59063d0..3b077c1 100644
--- a/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
+++ b/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/ZipArchive/ZipExporter.swift b/Sources/WireGuardApp/ZipArchive/ZipExporter.swift
index 1e6496a..473db2f 100644
--- a/Sources/WireGuardApp/ZipArchive/ZipExporter.swift
+++ b/Sources/WireGuardApp/ZipArchive/ZipExporter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/ZipArchive/ZipImporter.swift b/Sources/WireGuardApp/ZipArchive/ZipImporter.swift
index 9ea89e3..d5e507d 100644
--- a/Sources/WireGuardApp/ZipArchive/ZipImporter.swift
+++ b/Sources/WireGuardApp/ZipArchive/ZipImporter.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/WireGuardApp/de.lproj/Localizable.strings b/Sources/WireGuardApp/de.lproj/Localizable.strings
index ffcb429..cc0a93e 100644
--- a/Sources/WireGuardApp/de.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/de.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/es.lproj/Localizable.strings b/Sources/WireGuardApp/es.lproj/Localizable.strings
index 0ffc994..a4ba300 100644
--- a/Sources/WireGuardApp/es.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/es.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/fa.lproj/Localizable.strings b/Sources/WireGuardApp/fa.lproj/Localizable.strings
index 43bd393..7f220da 100644
--- a/Sources/WireGuardApp/fa.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/fa.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/fi.lproj/Localizable.strings b/Sources/WireGuardApp/fi.lproj/Localizable.strings
index b359675..4c2604d 100644
--- a/Sources/WireGuardApp/fi.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/fi.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/fr.lproj/Localizable.strings b/Sources/WireGuardApp/fr.lproj/Localizable.strings
index aeeed29..43dcfd8 100644
--- a/Sources/WireGuardApp/fr.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/fr.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/id.lproj/Localizable.strings b/Sources/WireGuardApp/id.lproj/Localizable.strings
index c337cfa..a1e9ca5 100644
--- a/Sources/WireGuardApp/id.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/id.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/it.lproj/Localizable.strings b/Sources/WireGuardApp/it.lproj/Localizable.strings
index 68acfc2..4176881 100644
--- a/Sources/WireGuardApp/it.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/it.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/ja.lproj/Localizable.strings b/Sources/WireGuardApp/ja.lproj/Localizable.strings
index be5d30b..07ec818 100644
--- a/Sources/WireGuardApp/ja.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/ja.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/ko.lproj/Localizable.strings b/Sources/WireGuardApp/ko.lproj/Localizable.strings
index 39634f2..070b3fc 100644
--- a/Sources/WireGuardApp/ko.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/ko.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/pa.lproj/Localizable.strings b/Sources/WireGuardApp/pa.lproj/Localizable.strings
index 54cef5f..c2b22ce 100644
--- a/Sources/WireGuardApp/pa.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/pa.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/pl.lproj/Localizable.strings b/Sources/WireGuardApp/pl.lproj/Localizable.strings
index 550344a..5741570 100644
--- a/Sources/WireGuardApp/pl.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/pl.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/ro.lproj/Localizable.strings b/Sources/WireGuardApp/ro.lproj/Localizable.strings
index 0b0843f..fe44155 100644
--- a/Sources/WireGuardApp/ro.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/ro.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/ru.lproj/Localizable.strings b/Sources/WireGuardApp/ru.lproj/Localizable.strings
index aa18919..c05a566 100644
--- a/Sources/WireGuardApp/ru.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/ru.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/sl.lproj/Localizable.strings b/Sources/WireGuardApp/sl.lproj/Localizable.strings
index b57da97..a4434c0 100644
--- a/Sources/WireGuardApp/sl.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/sl.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/tr.lproj/Localizable.strings b/Sources/WireGuardApp/tr.lproj/Localizable.strings
index 537d28c..84868dd 100644
--- a/Sources/WireGuardApp/tr.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/tr.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings b/Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings
index 1f97382..83dbd8d 100644
--- a/Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names
diff --git a/Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings b/Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings
index 5aef8b4..41bc672 100644
--- a/Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
// Generic alert action names