Do some code clean up
- Use guard in validators - Rename URL.openURL() to URL.open() - Sort imports (SwiftLint) - Drop unused VPNProtocolType.allTypes - Drop unused imports
This commit is contained in:
parent
1051a8dc52
commit
b4ad8dea0d
|
@ -5,6 +5,8 @@ included:
|
||||||
analyzer_rules:
|
analyzer_rules:
|
||||||
- unused_declaration
|
- unused_declaration
|
||||||
- unused_import
|
- unused_import
|
||||||
|
opt_in_rules:
|
||||||
|
- sorted_imports
|
||||||
disabled_rules:
|
disabled_rules:
|
||||||
- cyclomatic_complexity
|
- cyclomatic_complexity
|
||||||
- file_length
|
- file_length
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import UIKit
|
||||||
|
|
||||||
class AppDelegate: UIResponder, UIApplicationDelegate, ObservableObject {
|
class AppDelegate: UIResponder, UIApplicationDelegate, ObservableObject {
|
||||||
private let mac = MacBundle.shared
|
private let mac = MacBundle.shared
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import UniformTypeIdentifiers
|
|
||||||
import SwiftyBeaver
|
import SwiftyBeaver
|
||||||
|
import UniformTypeIdentifiers
|
||||||
|
|
||||||
extension Constants {
|
extension Constants {
|
||||||
enum App {
|
enum App {
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
|
||||||
import LocalAuthentication
|
import LocalAuthentication
|
||||||
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension View {
|
extension View {
|
||||||
var themeIdiom: UIUserInterfaceIdiom {
|
var themeIdiom: UIUserInterfaceIdiom {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import StoreKit
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import StoreKit
|
||||||
|
|
||||||
struct LocalProduct: RawRepresentable, Equatable, Hashable {
|
struct LocalProduct: RawRepresentable, Equatable, Hashable {
|
||||||
private static let bundleSubdomain = "ios"
|
private static let bundleSubdomain = "ios"
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import Kvitto
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
import StoreKit
|
import StoreKit
|
||||||
import Kvitto
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
enum ProductError: Error {
|
enum ProductError: Error {
|
||||||
case uneligible
|
case uneligible
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
import Intents
|
import Intents
|
||||||
import IntentsUI
|
import IntentsUI
|
||||||
import Combine
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
import Combine
|
|
||||||
|
|
||||||
class DefaultLightProfile: LightProfile {
|
class DefaultLightProfile: LightProfile {
|
||||||
let id: UUID
|
let id: UUID
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
|
||||||
class DefaultLightProviderCategory: LightProviderCategory {
|
class DefaultLightProviderCategory: LightProviderCategory {
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
import Combine
|
|
||||||
|
|
||||||
class DefaultLightVPNManager: LightVPNManager {
|
class DefaultLightVPNManager: LightVPNManager {
|
||||||
private let vpnManager = VPNManager.shared
|
private let vpnManager = VPNManager.shared
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
@main
|
@main
|
||||||
struct PassepartoutApp: App {
|
struct PassepartoutApp: App {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import UIKit
|
||||||
|
|
||||||
struct ActivityView: UIViewControllerRepresentable {
|
struct ActivityView: UIViewControllerRepresentable {
|
||||||
let activityItems: [Any]
|
let activityItems: [Any]
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Intents
|
import Intents
|
||||||
import IntentsUI
|
import IntentsUI
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct IntentAddView: UIViewControllerRepresentable {
|
struct IntentAddView: UIViewControllerRepresentable {
|
||||||
let shortcut: INShortcut
|
let shortcut: INShortcut
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Intents
|
import Intents
|
||||||
import IntentsUI
|
import IntentsUI
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct IntentEditView: UIViewControllerRepresentable {
|
struct IntentEditView: UIViewControllerRepresentable {
|
||||||
let shortcut: Shortcut
|
let shortcut: Shortcut
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import MessageUI
|
import MessageUI
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct MailComposerView: UIViewControllerRepresentable {
|
struct MailComposerView: UIViewControllerRepresentable {
|
||||||
class Coordinator: NSObject, MFMailComposeViewControllerDelegate {
|
class Coordinator: NSObject, MFMailComposeViewControllerDelegate {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import StoreKit
|
import StoreKit
|
||||||
|
import UIKit
|
||||||
|
|
||||||
public class Reviewer: ObservableObject {
|
public class Reviewer: ObservableObject {
|
||||||
private struct Keys {
|
private struct Keys {
|
||||||
|
|
|
@ -61,13 +61,12 @@ struct Validators {
|
||||||
var sin = sockaddr_in()
|
var sin = sockaddr_in()
|
||||||
var sin6 = sockaddr_in6()
|
var sin6 = sockaddr_in6()
|
||||||
|
|
||||||
if string.withCString({ cstring in inet_pton(AF_INET6, cstring, &sin6.sin6_addr) }) == 1 {
|
guard string.withCString({ cstring in inet_pton(AF_INET6, cstring, &sin6.sin6_addr) }) == 1 else {
|
||||||
return
|
throw ValidationError.ipAddress
|
||||||
}
|
}
|
||||||
if string.withCString({ cstring in inet_pton(AF_INET, cstring, &sin.sin_addr) }) == 1 {
|
if string.withCString({ cstring in inet_pton(AF_INET, cstring, &sin.sin_addr) }) == 1 {
|
||||||
return
|
throw ValidationError.ipAddress
|
||||||
}
|
}
|
||||||
throw ValidationError.ipAddress
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static func domainName(_ string: String) throws {
|
static func domainName(_ string: String) throws {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
enum ShortcutType: String {
|
enum ShortcutType: String {
|
||||||
case enableVPN
|
case enableVPN
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
func sceneDidEnterBackground(_ scene: UIScene) {
|
func sceneDidEnterBackground(_ scene: UIScene) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ struct AboutView: View {
|
||||||
private var supportSection: some View {
|
private var supportSection: some View {
|
||||||
Section {
|
Section {
|
||||||
Button(L10n.About.Items.JoinCommunity.caption) {
|
Button(L10n.About.Items.JoinCommunity.caption) {
|
||||||
URL.openURL(redditURL)
|
URL.open(redditURL)
|
||||||
}
|
}
|
||||||
Button(L10n.About.Items.ShareTwitter.caption, action: shareOnTwitter)
|
Button(L10n.About.Items.ShareTwitter.caption, action: shareOnTwitter)
|
||||||
Button(L10n.About.Items.WriteReview.caption, action: submitReview)
|
Button(L10n.About.Items.WriteReview.caption, action: submitReview)
|
||||||
|
@ -85,16 +85,16 @@ struct AboutView: View {
|
||||||
private var webSection: some View {
|
private var webSection: some View {
|
||||||
Section {
|
Section {
|
||||||
Button(L10n.About.Items.Website.caption) {
|
Button(L10n.About.Items.Website.caption) {
|
||||||
URL.openURL(homeURL)
|
URL.open(homeURL)
|
||||||
}
|
}
|
||||||
Button(Unlocalized.About.faq) {
|
Button(Unlocalized.About.faq) {
|
||||||
URL.openURL(faqURL)
|
URL.open(faqURL)
|
||||||
}
|
}
|
||||||
Button(L10n.About.Items.Disclaimer.caption) {
|
Button(L10n.About.Items.Disclaimer.caption) {
|
||||||
URL.openURL(disclaimerURL)
|
URL.open(disclaimerURL)
|
||||||
}
|
}
|
||||||
Button(L10n.About.Items.PrivacyPolicy.caption) {
|
Button(L10n.About.Items.PrivacyPolicy.caption) {
|
||||||
URL.openURL(privacyURL)
|
URL.open(privacyURL)
|
||||||
}
|
}
|
||||||
} header: {
|
} header: {
|
||||||
Text(L10n.About.Sections.Web.header)
|
Text(L10n.About.Sections.Web.header)
|
||||||
|
@ -104,10 +104,10 @@ struct AboutView: View {
|
||||||
private var githubSection: some View {
|
private var githubSection: some View {
|
||||||
Section {
|
Section {
|
||||||
Button(Unlocalized.About.readme) {
|
Button(Unlocalized.About.readme) {
|
||||||
URL.openURL(readmeURL)
|
URL.open(readmeURL)
|
||||||
}
|
}
|
||||||
Button(Unlocalized.About.changelog) {
|
Button(Unlocalized.About.changelog) {
|
||||||
URL.openURL(changelogURL)
|
URL.open(changelogURL)
|
||||||
}
|
}
|
||||||
} header: {
|
} header: {
|
||||||
Text(Unlocalized.About.github)
|
Text(Unlocalized.About.github)
|
||||||
|
@ -118,11 +118,11 @@ struct AboutView: View {
|
||||||
extension AboutView {
|
extension AboutView {
|
||||||
private func shareOnTwitter() {
|
private func shareOnTwitter() {
|
||||||
let url = Unlocalized.Social.twitterIntent(withMessage: shareMessage)
|
let url = Unlocalized.Social.twitterIntent(withMessage: shareMessage)
|
||||||
URL.openURL(url)
|
URL.open(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func submitReview() {
|
private func submitReview() {
|
||||||
let reviewURL = Reviewer.urlForReview(withAppId: Constants.App.appStoreId)
|
let reviewURL = Reviewer.urlForReview(withAppId: Constants.App.appStoreId)
|
||||||
URL.openURL(reviewURL)
|
URL.open(reviewURL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct AccountView: View {
|
struct AccountView: View {
|
||||||
@ObservedObject private var providerManager: ProviderManager
|
@ObservedObject private var providerManager: ProviderManager
|
||||||
|
@ -116,7 +116,7 @@ struct AccountView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func openGuidanceURL(_ url: URL) {
|
private func openGuidanceURL(_ url: URL) {
|
||||||
URL.openURL(url)
|
URL.open(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
import TunnelKitOpenVPN
|
import TunnelKitOpenVPN
|
||||||
import TunnelKitWireGuard
|
import TunnelKitWireGuard
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct AddProfileMenu: View {
|
struct AddProfileMenu: View {
|
||||||
enum ModalType: Identifiable {
|
enum ModalType: Identifiable {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
enum AddProfileView {
|
enum AddProfileView {
|
||||||
struct Bindings {
|
struct Bindings {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension AddProviderView {
|
extension AddProviderView {
|
||||||
struct NameView: View {
|
struct NameView: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct AddProviderView: View {
|
struct AddProviderView: View {
|
||||||
@ObservedObject private var providerManager: ProviderManager
|
@ObservedObject private var providerManager: ProviderManager
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
import Combine
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct DebugLogView: View {
|
struct DebugLogView: View {
|
||||||
private let title: String
|
private let title: String
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
import TunnelKitOpenVPN
|
import TunnelKitOpenVPN
|
||||||
|
|
||||||
extension DiagnosticsView {
|
extension DiagnosticsView {
|
||||||
|
@ -178,7 +178,7 @@ extension DiagnosticsView.OpenVPNView {
|
||||||
guard let url = URL.mailto(to: V.recipient, subject: V.subject, body: body) else {
|
guard let url = URL.mailto(to: V.recipient, subject: V.subject, body: body) else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
guard URL.openURL(url) else {
|
guard URL.open(url) else {
|
||||||
alertType = .emailNotConfigured
|
alertType = .emailNotConfigured
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
import TunnelKitWireGuard
|
import TunnelKitWireGuard
|
||||||
|
|
||||||
extension DiagnosticsView {
|
extension DiagnosticsView {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct DiagnosticsView: View {
|
struct DiagnosticsView: View {
|
||||||
let vpnProtocol: VPNProtocolType
|
let vpnProtocol: VPNProtocolType
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import StoreKit
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import StoreKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct DonateView: View {
|
struct DonateView: View {
|
||||||
enum AlertType: Identifiable {
|
enum AlertType: Identifiable {
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import PassepartoutLibrary
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import TunnelKitOpenVPN
|
import TunnelKitOpenVPN
|
||||||
import PassepartoutLibrary
|
|
||||||
|
|
||||||
extension EndpointAdvancedView {
|
extension EndpointAdvancedView {
|
||||||
struct OpenVPNView: View {
|
struct OpenVPNView: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
import TunnelKitOpenVPN
|
import TunnelKitOpenVPN
|
||||||
|
|
||||||
extension EndpointView {
|
extension EndpointView {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
import TunnelKitWireGuard
|
import TunnelKitWireGuard
|
||||||
|
|
||||||
extension EndpointView {
|
extension EndpointView {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct EndpointView: View {
|
struct EndpointView: View {
|
||||||
@ObservedObject private var currentProfile: ObservableProfile
|
@ObservedObject private var currentProfile: ObservableProfile
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct InteractiveConnectionView: View {
|
struct InteractiveConnectionView: View {
|
||||||
@Environment(\.presentationMode) private var presentationMode
|
@Environment(\.presentationMode) private var presentationMode
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct NetworkSettingsView: View {
|
struct NetworkSettingsView: View {
|
||||||
@ObservedObject private var currentProfile: ObservableProfile
|
@ObservedObject private var currentProfile: ObservableProfile
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension OnDemandView {
|
extension OnDemandView {
|
||||||
struct SSIDList: View {
|
struct SSIDList: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct OnDemandView: View {
|
struct OnDemandView: View {
|
||||||
@ObservedObject private var productManager: ProductManager
|
@ObservedObject private var productManager: ProductManager
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension OrganizerView {
|
extension OrganizerView {
|
||||||
struct ProfileRow: View {
|
struct ProfileRow: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension OrganizerView {
|
extension OrganizerView {
|
||||||
struct ProfilesList: View {
|
struct ProfilesList: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension OrganizerView {
|
extension OrganizerView {
|
||||||
struct SceneView: View {
|
struct SceneView: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct OrganizerView: View {
|
struct OrganizerView: View {
|
||||||
enum ModalType: Identifiable {
|
enum ModalType: Identifiable {
|
||||||
|
@ -151,7 +151,7 @@ extension OrganizerView {
|
||||||
message: Text(L10n.Organizer.Alerts.Reddit.message),
|
message: Text(L10n.Organizer.Alerts.Reddit.message),
|
||||||
primaryButton: .default(Text(L10n.Organizer.Alerts.Reddit.Buttons.subscribe)) {
|
primaryButton: .default(Text(L10n.Organizer.Alerts.Reddit.Buttons.subscribe)) {
|
||||||
didHandleSubreddit = true
|
didHandleSubreddit = true
|
||||||
URL.openURL(redditURL)
|
URL.open(redditURL)
|
||||||
},
|
},
|
||||||
secondaryButton: .cancel(Text(L10n.Global.Alerts.Buttons.never)) {
|
secondaryButton: .cancel(Text(L10n.Global.Alerts.Buttons.never)) {
|
||||||
didHandleSubreddit = true
|
didHandleSubreddit = true
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import StoreKit
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import StoreKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension PaywallView {
|
extension PaywallView {
|
||||||
struct PurchaseView: View {
|
struct PurchaseView: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct ConfigurationSection: View {
|
struct ConfigurationSection: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct DiagnosticsSection: View {
|
struct DiagnosticsSection: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct ExtraSection: View {
|
struct ExtraSection: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct MainMenu: View {
|
struct MainMenu: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct ProviderSection: View, ProviderProfileAvailability {
|
struct ProviderSection: View, ProviderProfileAvailability {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct RenameView: View {
|
struct RenameView: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ProfileView {
|
extension ProfileView {
|
||||||
struct VPNSection: View {
|
struct VPNSection: View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct ProfileView: View {
|
struct ProfileView: View {
|
||||||
enum ModalType: Int, Identifiable {
|
enum ModalType: Int, Identifiable {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct ProviderLocationView: View, ProviderProfileAvailability {
|
struct ProviderLocationView: View, ProviderProfileAvailability {
|
||||||
@ObservedObject var providerManager: ProviderManager
|
@ObservedObject var providerManager: ProviderManager
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct ProviderPresetView: View {
|
struct ProviderPresetView: View {
|
||||||
@Environment(\.presentationMode) private var presentationMode
|
@Environment(\.presentationMode) private var presentationMode
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import MessageUI
|
import MessageUI
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct ReportIssueView: View {
|
struct ReportIssueView: View {
|
||||||
@Binding private var isPresented: Bool
|
@Binding private var isPresented: Bool
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct SettingsButton: View {
|
struct SettingsButton: View {
|
||||||
@State private var isPresented = false
|
@State private var isPresented = false
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
@ObservedObject private var profileManager: ProfileManager
|
@ObservedObject private var profileManager: ProfileManager
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Intents
|
import Intents
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension ShortcutsView {
|
extension ShortcutsView {
|
||||||
struct AddView: View {
|
struct AddView: View {
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Intents
|
import Intents
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct ShortcutsView: View {
|
struct ShortcutsView: View {
|
||||||
enum ModalType: Identifiable {
|
enum ModalType: Identifiable {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct VPNStatusText: View {
|
struct VPNStatusText: View {
|
||||||
@ObservedObject private var currentVPNState: ObservableVPNState
|
@ObservedObject private var currentVPNState: ObservableVPNState
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct VPNToggle: View {
|
struct VPNToggle: View {
|
||||||
@ObservedObject private var profileManager: ProfileManager
|
@ObservedObject private var profileManager: ProfileManager
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
import SwiftUI
|
||||||
import SwiftyBeaver
|
import SwiftyBeaver
|
||||||
|
|
||||||
extension View {
|
extension View {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import PassepartoutLibrary
|
import PassepartoutLibrary
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import NetworkExtension
|
||||||
|
import PassepartoutLibrary
|
||||||
import TunnelKitManager
|
import TunnelKitManager
|
||||||
import TunnelKitOpenVPN
|
import TunnelKitOpenVPN
|
||||||
import TunnelKitWireGuard
|
import TunnelKitWireGuard
|
||||||
import NetworkExtension
|
|
||||||
import PassepartoutLibrary
|
|
||||||
|
|
||||||
extension VPNStatus {
|
extension VPNStatus {
|
||||||
var localizedDescription: String {
|
var localizedDescription: String {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
|
class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
|
||||||
private let appURL = Constants.Launcher.appURL
|
private let appURL = Constants.Launcher.appURL
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
private let bundle = Constants.Mac.bundle
|
private let bundle = Constants.Mac.bundle
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
class DefaultMacUtils: MacUtils {
|
class DefaultMacUtils: MacUtils {
|
||||||
private(set) lazy var isStartedByLauncher = NSApp.isHidden
|
private(set) lazy var isStartedByLauncher = NSApp.isHidden
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct HostProfileItem: Item {
|
struct HostProfileItem: Item {
|
||||||
private let viewModel: ViewModel
|
private let viewModel: ViewModel
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import ServiceManagement
|
import ServiceManagement
|
||||||
|
|
||||||
extension LaunchOnLoginItem {
|
extension LaunchOnLoginItem {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct LaunchOnLoginItem: Item {
|
struct LaunchOnLoginItem: Item {
|
||||||
private let viewModel: ViewModel
|
private let viewModel: ViewModel
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
extension PassepartoutMenu {
|
extension PassepartoutMenu {
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
class PassepartoutMenu {
|
class PassepartoutMenu {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct ProfileItemGroup: ItemGroup {
|
struct ProfileItemGroup: ItemGroup {
|
||||||
private let profileManager: LightProfileManager
|
private let profileManager: LightProfileManager
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct ProviderLocationItem: Item {
|
struct ProviderLocationItem: Item {
|
||||||
private let profile: LightProfile
|
private let profile: LightProfile
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct ProviderProfileItem: Item {
|
struct ProviderProfileItem: Item {
|
||||||
private let viewModel: ViewModel
|
private let viewModel: ViewModel
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct ProviderServerItem: Item {
|
struct ProviderServerItem: Item {
|
||||||
private let profile: LightProfile
|
private let profile: LightProfile
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
extension VPNItemGroup {
|
extension VPNItemGroup {
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct VPNItemGroup: ItemGroup {
|
struct VPNItemGroup: ItemGroup {
|
||||||
private let viewModel: ViewModel
|
private let viewModel: ViewModel
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
extension VisibilityItem {
|
extension VisibilityItem {
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct VisibilityItem: Item {
|
struct VisibilityItem: Item {
|
||||||
private let title: String
|
private let title: String
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
protocol Item: ItemGroup {
|
protocol Item: ItemGroup {
|
||||||
func asMenuItem(withParent parent: NSMenu) -> NSMenuItem
|
func asMenuItem(withParent parent: NSMenu) -> NSMenuItem
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
protocol ItemGroup {
|
protocol ItemGroup {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
class ObservableProcessTransformer: ObservableObject {
|
class ObservableProcessTransformer: ObservableObject {
|
||||||
static let shared = ObservableProcessTransformer()
|
static let shared = ObservableProcessTransformer()
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct SeparatorItem: Item {
|
struct SeparatorItem: Item {
|
||||||
func asMenuItem(withParent parent: NSMenu) -> NSMenuItem {
|
func asMenuItem(withParent parent: NSMenu) -> NSMenuItem {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct StaticSystemMenu: SystemMenu {
|
struct StaticSystemMenu: SystemMenu {
|
||||||
let children: [ItemGroup]
|
let children: [ItemGroup]
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
protocol SystemMenu {
|
protocol SystemMenu {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
extension TextItem {
|
extension TextItem {
|
||||||
class ViewModel {
|
class ViewModel {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct TextItem: Item {
|
struct TextItem: Item {
|
||||||
enum State {
|
enum State {
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import TunnelKit
|
|
||||||
|
|
||||||
extension Profile {
|
extension Profile {
|
||||||
public struct NetworkSettings: Codable, Equatable {
|
public struct NetworkSettings: Codable, Equatable {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public enum VPNProtocolType: String, Codable {
|
public enum VPNProtocolType: String, CaseIterable, Codable {
|
||||||
case openVPN = "ovpn"
|
case openVPN = "ovpn"
|
||||||
|
|
||||||
case wireGuard = "wg"
|
case wireGuard = "wg"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
@_exported import PassepartoutVPN
|
@_exported import PassepartoutCore
|
||||||
@_exported import PassepartoutProfiles
|
@_exported import PassepartoutProfiles
|
||||||
@_exported import PassepartoutProviders
|
@_exported import PassepartoutProviders
|
||||||
@_exported import PassepartoutServices
|
@_exported import PassepartoutServices
|
||||||
@_exported import PassepartoutUtils
|
@_exported import PassepartoutUtils
|
||||||
@_exported import PassepartoutCore
|
@_exported import PassepartoutVPN
|
||||||
@_exported import TunnelKit
|
@_exported import TunnelKit
|
||||||
@_exported import TunnelKitCore
|
@_exported import TunnelKitCore
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import GenericJSON
|
import GenericJSON
|
||||||
import TunnelKitCore
|
|
||||||
import TunnelKitOpenVPNCore
|
|
||||||
import TunnelKitManager
|
|
||||||
import PassepartoutCore
|
import PassepartoutCore
|
||||||
import PassepartoutUtils
|
import PassepartoutUtils
|
||||||
|
import TunnelKitCore
|
||||||
|
import TunnelKitManager
|
||||||
|
import TunnelKitOpenVPNCore
|
||||||
|
|
||||||
private typealias Map = [String: Any]
|
private typealias Map = [String: Any]
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import CoreData
|
import CoreData
|
||||||
import SwiftyBeaver
|
import Foundation
|
||||||
import PassepartoutCore
|
import PassepartoutCore
|
||||||
import PassepartoutUtils
|
import PassepartoutUtils
|
||||||
|
import SwiftyBeaver
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
public final class UpgradeManager: ObservableObject {
|
public final class UpgradeManager: ObservableObject {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import CoreData
|
import CoreData
|
||||||
|
import Foundation
|
||||||
|
|
||||||
@objc(CDProfile)
|
@objc(CDProfile)
|
||||||
public class CDProfile: NSManagedObject {
|
public class CDProfile: NSManagedObject {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import CoreData
|
import CoreData
|
||||||
|
import Foundation
|
||||||
|
|
||||||
extension CDProfile {
|
extension CDProfile {
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import PassepartoutCore
|
||||||
import TunnelKitCore
|
import TunnelKitCore
|
||||||
import TunnelKitOpenVPN
|
import TunnelKitOpenVPN
|
||||||
import PassepartoutCore
|
|
||||||
|
|
||||||
extension Profile.OpenVPNSettings: GatewaySettingsProviding {
|
extension Profile.OpenVPNSettings: GatewaySettingsProviding {
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import CoreData
|
import CoreData
|
||||||
|
import Foundation
|
||||||
import PassepartoutCore
|
import PassepartoutCore
|
||||||
|
|
||||||
extension PassepartoutDataModels {
|
extension PassepartoutDataModels {
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
import TunnelKitOpenVPN
|
import Foundation
|
||||||
import TunnelKitWireGuard
|
|
||||||
import PassepartoutCore
|
import PassepartoutCore
|
||||||
import PassepartoutUtils
|
import PassepartoutUtils
|
||||||
|
import TunnelKitOpenVPN
|
||||||
|
import TunnelKitWireGuard
|
||||||
|
|
||||||
extension ProviderServer.Preset {
|
extension ProviderServer.Preset {
|
||||||
public var openVPNConfiguration: OpenVPN.Configuration? {
|
public var openVPNConfiguration: OpenVPN.Configuration? {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import PassepartoutCore
|
import PassepartoutCore
|
||||||
import PassepartoutProviders
|
import PassepartoutProviders
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue