Move Demo into main project

This commit is contained in:
Davide De Rosa 2021-01-03 18:23:56 +01:00
parent 4670a5e634
commit 80472a6cd3
33 changed files with 1268 additions and 1257 deletions

7
Demo/.gitignore vendored
View File

@ -1,7 +0,0 @@
.DS_Store
*.swp
*.pbxuser
**/*.xcworkspace/xcuserdata
**/*.xcodeproj/project.xcworkspace
**/*.xcodeproj/xcuserdata
Pods

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>BasicTunnelExtension</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.networkextension.packet-tunnel</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).PacketTunnelProvider</string>
</dict>
</dict>
</plist>

View File

@ -1,29 +0,0 @@
//
// PacketTunnelProvider.swift
// Demo
//
// Created by Davide De Rosa on 10/15/17.
// Copyright (c) 2020 Davide De Rosa. All rights reserved.
//
// https://github.com/keeshux
//
// This file is part of TunnelKit.
//
// TunnelKit is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// TunnelKit is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with TunnelKit. If not, see <http://www.gnu.org/licenses/>.
//
import TunnelKit
class PacketTunnelProvider: OpenVPNTunnelProvider {
}

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Demo.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -1,24 +0,0 @@
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
abstract_target 'iOS' do
platform :ios, '12.0'
target 'BasicTunnelExtension-iOS' do
pod 'TunnelKit', :path => '..'
pod 'TunnelKit/Manager', :path => '..'
end
target 'BasicTunnel-iOS' do
end
end
abstract_target 'macOS' do
platform :osx, '10.15'
target 'BasicTunnelExtension-macOS' do
pod 'TunnelKit', :path => '..'
pod 'TunnelKit/Manager', :path => '..'
end
target 'BasicTunnel-macOS' do
end
end

View File

@ -1,39 +0,0 @@
PODS:
- OpenSSL-Apple (1.1.1h.10)
- SwiftyBeaver (1.9.3)
- TunnelKit (3.2.0):
- TunnelKit/Protocols/OpenVPN (= 3.2.0)
- TunnelKit/AppExtension (3.2.0):
- SwiftyBeaver
- TunnelKit/Core
- TunnelKit/Core (3.2.0):
- SwiftyBeaver
- TunnelKit/Manager (3.2.0):
- SwiftyBeaver
- TunnelKit/Protocols/OpenVPN (3.2.0):
- OpenSSL-Apple (~> 1.1.1h.10)
- TunnelKit/AppExtension
- TunnelKit/Core
- TunnelKit/Manager
DEPENDENCIES:
- TunnelKit (from `..`)
- TunnelKit/Manager (from `..`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- OpenSSL-Apple
- SwiftyBeaver
EXTERNAL SOURCES:
TunnelKit:
:path: ".."
SPEC CHECKSUMS:
OpenSSL-Apple: 8a8fcb06fb66f9c2f7aed45ce363668493b8e5f6
SwiftyBeaver: 2e8acd6fc90c6d0a27055867a290794926d57c02
TunnelKit: b9ea352cbcce641f98687109c2e7d8cb1fa40e19
PODFILE CHECKSUM: 518aaea9a529c96ba3024918bc0850dd6e92ac61
COCOAPODS: 1.10.0

25
Podfile
View File

@ -6,23 +6,36 @@ def shared_pods
pod 'OpenSSL-Apple', '~> 1.1.1h.10'
end
abstract_target 'TunnelKit' do
def demo_pods
pod 'SwiftyBeaver'
end
abstract_target 'ios' do
platform :ios, '12.0'
target 'TunnelKit-iOS' do
platform :ios, '12.0'
shared_pods
end
target 'TunnelKitTests-iOS' do
platform :ios, '12.0'
end
target 'TunnelKitHost' do
platform :ios, '12.0'
end
target 'TunnelKitDemo-iOS' do
demo_pods
end
target 'TunnelKitDemoTunnel-iOS' do
end
end
abstract_target 'macos' do
platform :osx, '10.15'
target 'TunnelKit-macOS' do
platform :osx, '10.15'
shared_pods
end
target 'TunnelKitTests-macOS' do
platform :osx, '10.15'
end
target 'TunnelKitDemo-macOS' do
demo_pods
end
target 'TunnelKitDemoTunnel-macOS' do
end
end

View File

@ -15,6 +15,6 @@ SPEC CHECKSUMS:
OpenSSL-Apple: 8a8fcb06fb66f9c2f7aed45ce363668493b8e5f6
SwiftyBeaver: 2e8acd6fc90c6d0a27055867a290794926d57c02
PODFILE CHECKSUM: 39765227a0228f8761650ff44b1d28aad5cf3b52
PODFILE CHECKSUM: 3be01de221483b2dd290bdb02ec2c4bce662c5bf
COCOAPODS: 1.10.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05416825A232FD00EFC5FF"
BuildableName = "TunnelKitDemo-iOS.app"
BlueprintName = "TunnelKitDemo-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05416825A232FD00EFC5FF"
BuildableName = "TunnelKitDemo-iOS.app"
BlueprintName = "TunnelKitDemo-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05416825A232FD00EFC5FF"
BuildableName = "TunnelKitDemo-iOS.app"
BlueprintName = "TunnelKitDemo-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05422B25A236EB00EFC5FF"
BuildableName = "TunnelKitDemo-macOS.app"
BlueprintName = "TunnelKitDemo-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05422B25A236EB00EFC5FF"
BuildableName = "TunnelKitDemo-macOS.app"
BlueprintName = "TunnelKitDemo-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05422B25A236EB00EFC5FF"
BuildableName = "TunnelKitDemo-macOS.app"
BlueprintName = "TunnelKitDemo-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05419E25A2343500EFC5FF"
BuildableName = "TunnelKitDemoTunnel-iOS.appex"
BlueprintName = "TunnelKitDemoTunnel-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05416825A232FD00EFC5FF"
BuildableName = "TunnelKitDemo-iOS.app"
BlueprintName = "TunnelKitDemo-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05416825A232FD00EFC5FF"
BuildableName = "TunnelKitDemo-iOS.app"
BlueprintName = "TunnelKitDemo-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05416825A232FD00EFC5FF"
BuildableName = "TunnelKitDemo-iOS.app"
BlueprintName = "TunnelKitDemo-iOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05427625A239C600EFC5FF"
BuildableName = "TunnelKitDemoTunnel-macOS.appex"
BlueprintName = "TunnelKitDemoTunnel-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05422B25A236EB00EFC5FF"
BuildableName = "TunnelKitDemo-macOS.app"
BlueprintName = "TunnelKitDemo-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05422B25A236EB00EFC5FF"
BuildableName = "TunnelKitDemo-macOS.app"
BlueprintName = "TunnelKitDemo-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E05422B25A236EB00EFC5FF"
BuildableName = "TunnelKitDemo-macOS.app"
BlueprintName = "TunnelKitDemo-macOS"
ReferencedContainer = "container:TunnelKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -8,11 +8,11 @@
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.algoritmico.ios.demo.BasicTunnel</string>
<string>group.com.algoritmico.TunnelKit.Demo</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)group.com.algoritmico.ios.demo.BasicTunnel</string>
<string>$(AppIdentifierPrefix)group.com.algoritmico.TunnelKit.Demo</string>
</array>
</dict>
</plist>

View File

@ -8,11 +8,11 @@
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.algoritmico.ios.demo.BasicTunnel</string>
<string>group.com.algoritmico.TunnelKit.Demo</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)group.com.algoritmico.ios.demo.BasicTunnel</string>
<string>$(AppIdentifierPrefix)group.com.algoritmico.TunnelKit.Demo</string>
</array>
</dict>
</plist>

View File

@ -26,9 +26,9 @@
import UIKit
import TunnelKit
private let appGroup = "group.com.algoritmico.ios.demo.BasicTunnel"
private let appGroup = "group.com.algoritmico.TunnelKit.Demo"
private let tunnelIdentifier = "com.algoritmico.ios.demo.BasicTunnel.Extension"
private let tunnelIdentifier = "com.algoritmico.ios.TunnelKit.Demo.Tunnel"
class ViewController: UIViewController, URLSessionDataDelegate {
@IBOutlet var textUsername: UITextField!

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -620,7 +620,7 @@
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleSourceList:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
</connections>
</menuItem>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
@ -675,7 +675,7 @@
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="BasicTunnel_macOS" customModuleProvider="target"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Demo_macOS" customModuleProvider="target"/>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
@ -685,7 +685,7 @@
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="480"/>
@ -705,59 +705,59 @@
<!--View Controller-->
<scene sceneID="hIz-AP-VOD">
<objects>
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="BasicTunnel_macOS" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="Demo_macOS" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="480" height="143"/>
<rect key="frame" x="0.0" y="0.0" width="480" height="140"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="i3T-uV-wV3">
<rect key="frame" x="20" y="101" width="100" height="22"/>
<rect key="frame" x="20" y="99" width="100" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="15v-2e-tlT"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="qXL-ZI-P0P">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="LIN-Ps-ANN">
<rect key="frame" x="140" y="101" width="230" height="22"/>
<rect key="frame" x="140" y="99" width="230" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="1ir-yf-OCa">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P4h-p9-zCb">
<rect key="frame" x="390" y="101" width="70" height="22"/>
<rect key="frame" x="390" y="99" width="70" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="70" id="Cba-GL-f5a"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="nYd-Lk-W7w">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sFz-8v-h8e">
<rect key="frame" x="20" y="61" width="210" height="22"/>
<rect key="frame" x="20" y="60" width="210" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="ljE-Uv-5Le">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="et1-VP-AGe">
<rect key="frame" x="250" y="61" width="210" height="22"/>
<rect key="frame" x="250" y="60" width="210" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="0sQ-3n-XfE">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nd2-H7-u7j">
<rect key="frame" x="14" y="13" width="452" height="32"/>
<rect key="frame" x="13" y="13" width="454" height="32"/>
<buttonCell key="cell" type="push" title="Connect" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bKB-ql-HWr">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>

View File

@ -10,7 +10,7 @@
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>$(TeamIdentifierPrefix)group.com.algoritmico.macos.demo.BasicTunnel</string>
<string>$(TeamIdentifierPrefix)group.com.algoritmico.TunnelKit.Demo</string>
</array>
<key>com.apple.security.network.client</key>
<true/>

View File

@ -10,7 +10,7 @@
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>$(TeamIdentifierPrefix)group.com.algoritmico.macos.demo.BasicTunnel</string>
<string>$(TeamIdentifierPrefix)group.com.algoritmico.TunnelKit.Demo</string>
</array>
<key>com.apple.security.network.client</key>
<true/>

View File

@ -24,12 +24,11 @@
//
import Cocoa
import NetworkExtension
import TunnelKit
private let appGroup = "DTDYD63ZX9.group.com.algoritmico.macos.demo.BasicTunnel"
private let appGroup = "DTDYD63ZX9.group.com.algoritmico.TunnelKit.Demo"
private let tunnelIdentifier = "com.algoritmico.macos.demo.BasicTunnel.Extension"
private let tunnelIdentifier = "com.algoritmico.macos.TunnelKit.Demo.Tunnel"
class ViewController: NSViewController {
@IBOutlet var textUsername: NSTextField!