diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0be2743 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Xcode specifics +.DS_Store +UserInterfaceState.xcuserstate +xcuserdata/ + +# JetBrains +.idea/ \ No newline at end of file diff --git a/Coder Desktop/Coder Desktop.xcodeproj/project.pbxproj b/Coder Desktop/Coder Desktop.xcodeproj/project.pbxproj new file mode 100644 index 0000000..91d1fbf --- /dev/null +++ b/Coder Desktop/Coder Desktop.xcodeproj/project.pbxproj @@ -0,0 +1,729 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 961679332CFF117300B2B6DF /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 961679322CFF117300B2B6DF /* NetworkExtension.framework */; }; + 9616793D2CFF117300B2B6DF /* com.coder.Coder-Desktop.VPN.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 961679302CFF117300B2B6DF /* com.coder.Coder-Desktop.VPN.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 961679102CFF100E00B2B6DF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 961678F42CFF100D00B2B6DF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 961678FB2CFF100D00B2B6DF; + remoteInfo = "Coder Desktop"; + }; + 9616791A2CFF100E00B2B6DF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 961678F42CFF100D00B2B6DF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 961678FB2CFF100D00B2B6DF; + remoteInfo = "Coder Desktop"; + }; + 9616793B2CFF117300B2B6DF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 961678F42CFF100D00B2B6DF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9616792F2CFF117300B2B6DF; + remoteInfo = VPN; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 961679422CFF117300B2B6DF /* Embed System Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(SYSTEM_EXTENSIONS_FOLDER_PATH)"; + dstSubfolderSpec = 16; + files = ( + 9616793D2CFF117300B2B6DF /* com.coder.Coder-Desktop.VPN.systemextension in Embed System Extensions */, + ); + name = "Embed System Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 961678FC2CFF100D00B2B6DF /* Coder Desktop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Coder Desktop.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9616790F2CFF100E00B2B6DF /* Coder DesktopTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Coder DesktopTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 961679192CFF100E00B2B6DF /* Coder DesktopUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Coder DesktopUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 961679302CFF117300B2B6DF /* com.coder.Coder-Desktop.VPN.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = "com.coder.Coder-Desktop.VPN.systemextension"; sourceTree = BUILT_PRODUCTS_DIR; }; + 961679322CFF117300B2B6DF /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 9616793E2CFF117300B2B6DF /* Exceptions for "VPN" folder in "VPN" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 9616792F2CFF117300B2B6DF /* VPN */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 961678FE2CFF100D00B2B6DF /* Coder Desktop */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = "Coder Desktop"; + sourceTree = ""; + }; + 961679122CFF100E00B2B6DF /* Coder DesktopTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = "Coder DesktopTests"; + sourceTree = ""; + }; + 9616791C2CFF100E00B2B6DF /* Coder DesktopUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = "Coder DesktopUITests"; + sourceTree = ""; + }; + 961679342CFF117300B2B6DF /* VPN */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 9616793E2CFF117300B2B6DF /* Exceptions for "VPN" folder in "VPN" target */, + ); + path = VPN; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 961678F92CFF100D00B2B6DF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9616790C2CFF100E00B2B6DF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 961679162CFF100E00B2B6DF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9616792D2CFF117300B2B6DF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 961679332CFF117300B2B6DF /* NetworkExtension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 961678F32CFF100D00B2B6DF = { + isa = PBXGroup; + children = ( + 961678FE2CFF100D00B2B6DF /* Coder Desktop */, + 961679122CFF100E00B2B6DF /* Coder DesktopTests */, + 9616791C2CFF100E00B2B6DF /* Coder DesktopUITests */, + 961679342CFF117300B2B6DF /* VPN */, + 961679312CFF117300B2B6DF /* Frameworks */, + 961678FD2CFF100D00B2B6DF /* Products */, + ); + sourceTree = ""; + }; + 961678FD2CFF100D00B2B6DF /* Products */ = { + isa = PBXGroup; + children = ( + 961678FC2CFF100D00B2B6DF /* Coder Desktop.app */, + 9616790F2CFF100E00B2B6DF /* Coder DesktopTests.xctest */, + 961679192CFF100E00B2B6DF /* Coder DesktopUITests.xctest */, + 961679302CFF117300B2B6DF /* com.coder.Coder-Desktop.VPN.systemextension */, + ); + name = Products; + sourceTree = ""; + }; + 961679312CFF117300B2B6DF /* Frameworks */ = { + isa = PBXGroup; + children = ( + 961679322CFF117300B2B6DF /* NetworkExtension.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 961678FB2CFF100D00B2B6DF /* Coder Desktop */ = { + isa = PBXNativeTarget; + buildConfigurationList = 961679232CFF100F00B2B6DF /* Build configuration list for PBXNativeTarget "Coder Desktop" */; + buildPhases = ( + 961678F82CFF100D00B2B6DF /* Sources */, + 961678F92CFF100D00B2B6DF /* Frameworks */, + 961678FA2CFF100D00B2B6DF /* Resources */, + 961679422CFF117300B2B6DF /* Embed System Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 9616793C2CFF117300B2B6DF /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 961678FE2CFF100D00B2B6DF /* Coder Desktop */, + ); + name = "Coder Desktop"; + packageProductDependencies = ( + ); + productName = "Coder Desktop"; + productReference = 961678FC2CFF100D00B2B6DF /* Coder Desktop.app */; + productType = "com.apple.product-type.application"; + }; + 9616790E2CFF100E00B2B6DF /* Coder DesktopTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 961679262CFF100F00B2B6DF /* Build configuration list for PBXNativeTarget "Coder DesktopTests" */; + buildPhases = ( + 9616790B2CFF100E00B2B6DF /* Sources */, + 9616790C2CFF100E00B2B6DF /* Frameworks */, + 9616790D2CFF100E00B2B6DF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 961679112CFF100E00B2B6DF /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 961679122CFF100E00B2B6DF /* Coder DesktopTests */, + ); + name = "Coder DesktopTests"; + packageProductDependencies = ( + ); + productName = "Coder DesktopTests"; + productReference = 9616790F2CFF100E00B2B6DF /* Coder DesktopTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 961679182CFF100E00B2B6DF /* Coder DesktopUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 961679292CFF100F00B2B6DF /* Build configuration list for PBXNativeTarget "Coder DesktopUITests" */; + buildPhases = ( + 961679152CFF100E00B2B6DF /* Sources */, + 961679162CFF100E00B2B6DF /* Frameworks */, + 961679172CFF100E00B2B6DF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9616791B2CFF100E00B2B6DF /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 9616791C2CFF100E00B2B6DF /* Coder DesktopUITests */, + ); + name = "Coder DesktopUITests"; + packageProductDependencies = ( + ); + productName = "Coder DesktopUITests"; + productReference = 961679192CFF100E00B2B6DF /* Coder DesktopUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 9616792F2CFF117300B2B6DF /* VPN */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9616793F2CFF117300B2B6DF /* Build configuration list for PBXNativeTarget "VPN" */; + buildPhases = ( + 9616792C2CFF117300B2B6DF /* Sources */, + 9616792D2CFF117300B2B6DF /* Frameworks */, + 9616792E2CFF117300B2B6DF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 961679342CFF117300B2B6DF /* VPN */, + ); + name = VPN; + packageProductDependencies = ( + ); + productName = VPN; + productReference = 961679302CFF117300B2B6DF /* com.coder.Coder-Desktop.VPN.systemextension */; + productType = "com.apple.product-type.system-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 961678F42CFF100D00B2B6DF /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1610; + LastUpgradeCheck = 1610; + TargetAttributes = { + 961678FB2CFF100D00B2B6DF = { + CreatedOnToolsVersion = 16.1; + }; + 9616790E2CFF100E00B2B6DF = { + CreatedOnToolsVersion = 16.1; + TestTargetID = 961678FB2CFF100D00B2B6DF; + }; + 961679182CFF100E00B2B6DF = { + CreatedOnToolsVersion = 16.1; + TestTargetID = 961678FB2CFF100D00B2B6DF; + }; + 9616792F2CFF117300B2B6DF = { + CreatedOnToolsVersion = 16.1; + }; + }; + }; + buildConfigurationList = 961678F72CFF100D00B2B6DF /* Build configuration list for PBXProject "Coder Desktop" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 961678F32CFF100D00B2B6DF; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 961678FD2CFF100D00B2B6DF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 961678FB2CFF100D00B2B6DF /* Coder Desktop */, + 9616790E2CFF100E00B2B6DF /* Coder DesktopTests */, + 961679182CFF100E00B2B6DF /* Coder DesktopUITests */, + 9616792F2CFF117300B2B6DF /* VPN */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 961678FA2CFF100D00B2B6DF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9616790D2CFF100E00B2B6DF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 961679172CFF100E00B2B6DF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9616792E2CFF117300B2B6DF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 961678F82CFF100D00B2B6DF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9616790B2CFF100E00B2B6DF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 961679152CFF100E00B2B6DF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9616792C2CFF117300B2B6DF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 961679112CFF100E00B2B6DF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 961678FB2CFF100D00B2B6DF /* Coder Desktop */; + targetProxy = 961679102CFF100E00B2B6DF /* PBXContainerItemProxy */; + }; + 9616791B2CFF100E00B2B6DF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 961678FB2CFF100D00B2B6DF /* Coder Desktop */; + targetProxy = 9616791A2CFF100E00B2B6DF /* PBXContainerItemProxy */; + }; + 9616793C2CFF117300B2B6DF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9616792F2CFF117300B2B6DF /* VPN */; + targetProxy = 9616793B2CFF117300B2B6DF /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 961679212CFF100F00B2B6DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 961679222CFF100F00B2B6DF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 961679242CFF100F00B2B6DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Coder Desktop/Coder_Desktop.entitlements"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Coder Desktop/Preview Content\""; + DEVELOPMENT_TEAM = 4399GN35BJ; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-Desktop"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 961679252CFF100F00B2B6DF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Coder Desktop/Coder_Desktop.entitlements"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Coder Desktop/Preview Content\""; + DEVELOPMENT_TEAM = 4399GN35BJ; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-Desktop"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 961679272CFF100F00B2B6DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4399GN35BJ; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-DesktopTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Coder Desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Coder Desktop"; + }; + name = Debug; + }; + 961679282CFF100F00B2B6DF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4399GN35BJ; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-DesktopTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Coder Desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Coder Desktop"; + }; + name = Release; + }; + 9616792A2CFF100F00B2B6DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4399GN35BJ; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-DesktopUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = "Coder Desktop"; + }; + name = Debug; + }; + 9616792B2CFF100F00B2B6DF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4399GN35BJ; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-DesktopUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = "Coder Desktop"; + }; + name = Release; + }; + 961679402CFF117300B2B6DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = VPN/VPN.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4399GN35BJ; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = VPN/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = VPN; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-Desktop.VPN"; + PRODUCT_NAME = "$(inherited)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 961679412CFF117300B2B6DF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = VPN/VPN.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4399GN35BJ; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = VPN/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = VPN; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.coder.Coder-Desktop.VPN"; + PRODUCT_NAME = "$(inherited)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 961678F72CFF100D00B2B6DF /* Build configuration list for PBXProject "Coder Desktop" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 961679212CFF100F00B2B6DF /* Debug */, + 961679222CFF100F00B2B6DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 961679232CFF100F00B2B6DF /* Build configuration list for PBXNativeTarget "Coder Desktop" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 961679242CFF100F00B2B6DF /* Debug */, + 961679252CFF100F00B2B6DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 961679262CFF100F00B2B6DF /* Build configuration list for PBXNativeTarget "Coder DesktopTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 961679272CFF100F00B2B6DF /* Debug */, + 961679282CFF100F00B2B6DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 961679292CFF100F00B2B6DF /* Build configuration list for PBXNativeTarget "Coder DesktopUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9616792A2CFF100F00B2B6DF /* Debug */, + 9616792B2CFF100F00B2B6DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9616793F2CFF117300B2B6DF /* Build configuration list for PBXNativeTarget "VPN" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 961679402CFF117300B2B6DF /* Debug */, + 961679412CFF117300B2B6DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 961678F42CFF100D00B2B6DF /* Project object */; +} diff --git a/Coder Desktop/Coder Desktop.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Coder Desktop/Coder Desktop.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Coder Desktop/Coder Desktop.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Coder Desktop/Coder Desktop/Assets.xcassets/AccentColor.colorset/Contents.json b/Coder Desktop/Coder Desktop/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Coder Desktop/Coder Desktop/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Coder Desktop/Coder Desktop/Assets.xcassets/AppIcon.appiconset/Contents.json b/Coder Desktop/Coder Desktop/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/Coder Desktop/Coder Desktop/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Coder Desktop/Coder Desktop/Assets.xcassets/Contents.json b/Coder Desktop/Coder Desktop/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Coder Desktop/Coder Desktop/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Coder Desktop/Coder Desktop/Coder_Desktop.entitlements b/Coder Desktop/Coder Desktop/Coder_Desktop.entitlements new file mode 100644 index 0000000..441279c --- /dev/null +++ b/Coder Desktop/Coder Desktop/Coder_Desktop.entitlements @@ -0,0 +1,16 @@ + + + + + com.apple.developer.networking.networkextension + + packet-tunnel-provider + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + + diff --git a/Coder Desktop/Coder Desktop/Coder_DesktopApp.swift b/Coder Desktop/Coder Desktop/Coder_DesktopApp.swift new file mode 100644 index 0000000..a8dd38d --- /dev/null +++ b/Coder Desktop/Coder Desktop/Coder_DesktopApp.swift @@ -0,0 +1,25 @@ +import SwiftUI +import SwiftData + +@main +struct Coder_DesktopApp: App { + var sharedModelContainer: ModelContainer = { + let schema = Schema([ + Item.self, + ]) + let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) + + do { + return try ModelContainer(for: schema, configurations: [modelConfiguration]) + } catch { + fatalError("Could not create ModelContainer: \(error)") + } + }() + + var body: some Scene { + WindowGroup { + ContentView() + } + .modelContainer(sharedModelContainer) + } +} diff --git a/Coder Desktop/Coder Desktop/ContentView.swift b/Coder Desktop/Coder Desktop/ContentView.swift new file mode 100644 index 0000000..08b81a8 --- /dev/null +++ b/Coder Desktop/Coder Desktop/ContentView.swift @@ -0,0 +1,52 @@ +import SwiftUI +import SwiftData + +struct ContentView: View { + @Environment(\.modelContext) private var modelContext + @Query private var items: [Item] + + var body: some View { + NavigationSplitView { + List { + ForEach(items) { item in + NavigationLink { + Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))") + } label: { + Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard)) + } + } + .onDelete(perform: deleteItems) + } + .navigationSplitViewColumnWidth(min: 180, ideal: 200) + .toolbar { + ToolbarItem { + Button(action: addItem) { + Label("Add Item", systemImage: "plus") + } + } + } + } detail: { + Text("Select an item") + } + } + + private func addItem() { + withAnimation { + let newItem = Item(timestamp: Date()) + modelContext.insert(newItem) + } + } + + private func deleteItems(offsets: IndexSet) { + withAnimation { + for index in offsets { + modelContext.delete(items[index]) + } + } + } +} + +#Preview { + ContentView() + .modelContainer(for: Item.self, inMemory: true) +} diff --git a/Coder Desktop/Coder Desktop/Item.swift b/Coder Desktop/Coder Desktop/Item.swift new file mode 100644 index 0000000..dd0170c --- /dev/null +++ b/Coder Desktop/Coder Desktop/Item.swift @@ -0,0 +1,11 @@ +import Foundation +import SwiftData + +@Model +final class Item { + var timestamp: Date + + init(timestamp: Date) { + self.timestamp = timestamp + } +} diff --git a/Coder Desktop/Coder Desktop/Preview Content/Preview Assets.xcassets/Contents.json b/Coder Desktop/Coder Desktop/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Coder Desktop/Coder Desktop/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Coder Desktop/Coder DesktopTests/Coder_DesktopTests.swift b/Coder Desktop/Coder DesktopTests/Coder_DesktopTests.swift new file mode 100644 index 0000000..6605d34 --- /dev/null +++ b/Coder Desktop/Coder DesktopTests/Coder_DesktopTests.swift @@ -0,0 +1,10 @@ +import Testing +@testable import Coder_Desktop + +struct Coder_DesktopTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/Coder Desktop/Coder DesktopUITests/Coder_DesktopUITests.swift b/Coder Desktop/Coder DesktopUITests/Coder_DesktopUITests.swift new file mode 100644 index 0000000..f405706 --- /dev/null +++ b/Coder Desktop/Coder DesktopUITests/Coder_DesktopUITests.swift @@ -0,0 +1,36 @@ +import XCTest + +final class Coder_DesktopUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + @MainActor + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + @MainActor + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/Coder Desktop/Coder DesktopUITests/Coder_DesktopUITestsLaunchTests.swift b/Coder Desktop/Coder DesktopUITests/Coder_DesktopUITestsLaunchTests.swift new file mode 100644 index 0000000..bde06fb --- /dev/null +++ b/Coder Desktop/Coder DesktopUITests/Coder_DesktopUITestsLaunchTests.swift @@ -0,0 +1,26 @@ +import XCTest + +final class Coder_DesktopUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/Coder Desktop/VPN/Info.plist b/Coder Desktop/VPN/Info.plist new file mode 100644 index 0000000..7709a84 --- /dev/null +++ b/Coder Desktop/VPN/Info.plist @@ -0,0 +1,18 @@ + + + + + NSSystemExtensionUsageDescription + + NetworkExtension + + NEMachServiceName + $(TeamIdentifierPrefix)com.example.app-group.MySystemExtension + NEProviderClasses + + com.apple.networkextension.packet-tunnel + $(PRODUCT_MODULE_NAME).PacketTunnelProvider + + + + diff --git a/Coder Desktop/VPN/PacketTunnelProvider.swift b/Coder Desktop/VPN/PacketTunnelProvider.swift new file mode 100644 index 0000000..c8a87cf --- /dev/null +++ b/Coder Desktop/VPN/PacketTunnelProvider.swift @@ -0,0 +1,29 @@ +import NetworkExtension + +class PacketTunnelProvider: NEPacketTunnelProvider { + + override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) { + // Add code here to start the process of connecting the tunnel. + } + + override func stopTunnel(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) { + // Add code here to start the process of stopping the tunnel. + completionHandler() + } + + override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)?) { + // Add code here to handle the message. + if let handler = completionHandler { + handler(messageData) + } + } + + override func sleep(completionHandler: @escaping () -> Void) { + // Add code here to get ready to sleep. + completionHandler() + } + + override func wake() { + // Add code here to wake up. + } +} diff --git a/Coder Desktop/VPN/VPN.entitlements b/Coder Desktop/VPN/VPN.entitlements new file mode 100644 index 0000000..b8ae396 --- /dev/null +++ b/Coder Desktop/VPN/VPN.entitlements @@ -0,0 +1,19 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.application-groups + + $(TeamIdentifierPrefix)com.example.app-group + + com.apple.developer.networking.networkextension + + packet-tunnel-provider + app-proxy-provider + content-filter-provider + dns-proxy + + + diff --git a/Coder Desktop/VPN/main.swift b/Coder Desktop/VPN/main.swift new file mode 100644 index 0000000..410c838 --- /dev/null +++ b/Coder Desktop/VPN/main.swift @@ -0,0 +1,8 @@ +import Foundation +import NetworkExtension + +autoreleasepool { + NEProvider.startSystemExtensionMode() +} + +dispatchMain()