Merge branch 'master' into an/shortcuts-integration

This commit is contained in:
Alessio Nossa
2024-02-28 10:28:12 +01:00
132 changed files with 898 additions and 305 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
+2 -2
View File
@@ -6,8 +6,8 @@ import PackageDescription
let package = Package(
name: "WireGuardKit",
platforms: [
.macOS(.v10_14),
.iOS(.v12)
.macOS(.v12),
.iOS(.v15)
],
products: [
.library(name: "WireGuardKit", targets: ["WireGuardKit"])
+1 -1
View File
@@ -18,7 +18,7 @@ $ cp Sources/WireGuardApp/Config/Developer.xcconfig.template Sources/WireGuardAp
$ vim Sources/WireGuardApp/Config/Developer.xcconfig
```
- Install swiftlint and go 1.15:
- Install swiftlint and go 1.19:
```
$ brew install swiftlint go
+1 -1
View File
@@ -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 os.log
+1 -1
View File
@@ -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 Security
+1 -1
View File
@@ -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 os.log
+1 -1
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
* Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
* Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
*/
#include <string.h>
+1 -1
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
* Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
* Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
*/
#ifndef RINGLOGGER_H
@@ -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
@@ -82,7 +82,6 @@ extension NETunnelProviderProtocol {
return true
}
#elseif os(iOS)
if #available(iOS 15, *) {
/* Update the stored reference from the old iOS 14 one to the canonical iOS 15 one.
* The iOS 14 ones are 96 bits, while the iOS 15 ones are 160 bits. We do this so
* that we can have fast set exclusion in deleteReferences safely. */
@@ -101,7 +100,6 @@ extension NETunnelProviderProtocol {
return true
}
}
}
#endif
return false
}
@@ -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
@@ -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
+1 -1
View File
@@ -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
@@ -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
@@ -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
+2 -2
View File
@@ -1,2 +1,2 @@
VERSION_NAME = 1.0.15
VERSION_ID = 26
VERSION_NAME = 1.0.16
VERSION_ID = 27
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)?)
+1 -1
View File
@@ -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
@@ -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
+1 -1
View File
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.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
}
return valueTextField
}()
@@ -64,19 +56,11 @@ class KeyValueCell: UITableViewCell {
var isValueValid = true {
didSet {
if #available(iOS 13.0, *) {
if isValueValid {
keyLabel.textColor = .label
} else {
keyLabel.textColor = .systemRed
}
} else {
if isValueValid {
keyLabel.textColor = .black
} else {
keyLabel.textColor = .red
}
}
}
}
@@ -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
}
}
}
@@ -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)
}
setTextAlignment(.left)
}
}
@@ -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.isEnabled = true
valueLabelScrollView.isScrollEnabled = false
valueTextField.widthAnchor.constraint(equalTo: valueLabelScrollView.widthAnchor).isActive = true
@@ -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
}
return label
}()
let busyIndicator: UIActivityIndicatorView = {
let busyIndicator: UIActivityIndicatorView
if #available(iOS 13.0, *) {
busyIndicator = UIActivityIndicatorView(style: .medium)
} else {
busyIndicator = UIActivityIndicatorView(style: .gray)
}
busyIndicator.hidesWhenStopped = true
return busyIndicator
}()
@@ -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 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.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)
@@ -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
@@ -13,11 +13,7 @@ class MainViewController: UISplitViewController {
init() {
let detailVC = UIViewController()
if #available(iOS 13.0, *) {
detailVC.view.backgroundColor = .systemBackground
} else {
detailVC.view.backgroundColor = .white
}
let detailNC = UINavigationController(rootViewController: detailVC)
let masterVC = TunnelsListTableViewController()
@@ -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
@@ -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
@@ -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.setTextAlignment(.center)
return cell
}
@@ -268,24 +264,9 @@ 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)
}
#endif
}
}
@@ -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
@@ -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
@@ -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
@@ -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.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
}
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
}
let detailNC = UINavigationController(rootViewController: detailVC)
splitViewController.showDetailViewController(detailNC, sender: self)
}
@@ -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
@@ -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
@@ -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
@@ -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
+1 -1
View File
@@ -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>
@@ -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
@@ -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>
@@ -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>
@@ -15,7 +15,7 @@ int main(int argc, char *argv[])
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)
@@ -28,9 +28,5 @@ int main(int argc, char *argv[])
[condition signal];
}];
[condition wait];
} else {
[NSWorkspace.sharedWorkspace launchAppWithBundleIdentifier:appId options:NSWorkspaceLaunchWithoutActivation
additionalEventParamDescriptor:NULL launchIdentifier:NULL];
}
return 0;
}
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.
*/
@@ -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.
*/
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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

Some files were not shown because too many files have changed in this diff Show More