Kaynağa Gözat

Removed files that should not be tracked

Eugene Fryntov 9 yıl önce
ebeveyn
işleme
3ca5de9436

+ 0 - 301
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel.xcodeproj/project.pbxproj

@@ -1,301 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		44980AEA1D64CC8D00B78274 /* PsiphonTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 44980AE81D64CC8D00B78274 /* PsiphonTunnel.h */; settings = {ATTRIBUTES = (Public, ); }; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		44980AE51D64CC8D00B78274 /* PsiphonTunnel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PsiphonTunnel.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		44980AE81D64CC8D00B78274 /* PsiphonTunnel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PsiphonTunnel.h; sourceTree = "<group>"; };
-		44980AE91D64CC8D00B78274 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		44980AE11D64CC8D00B78274 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		44980ADB1D64CC8D00B78274 = {
-			isa = PBXGroup;
-			children = (
-				44980AE71D64CC8D00B78274 /* PsiphonTunnel */,
-				44980AE61D64CC8D00B78274 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		44980AE61D64CC8D00B78274 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				44980AE51D64CC8D00B78274 /* PsiphonTunnel.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		44980AE71D64CC8D00B78274 /* PsiphonTunnel */ = {
-			isa = PBXGroup;
-			children = (
-				44980AE81D64CC8D00B78274 /* PsiphonTunnel.h */,
-				44980AE91D64CC8D00B78274 /* Info.plist */,
-			);
-			path = PsiphonTunnel;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		44980AE21D64CC8D00B78274 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				44980AEA1D64CC8D00B78274 /* PsiphonTunnel.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		44980AE41D64CC8D00B78274 /* PsiphonTunnel */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 44980AED1D64CC8D00B78274 /* Build configuration list for PBXNativeTarget "PsiphonTunnel" */;
-			buildPhases = (
-				44980AE01D64CC8D00B78274 /* Sources */,
-				44980AE11D64CC8D00B78274 /* Frameworks */,
-				44980AE21D64CC8D00B78274 /* Headers */,
-				44980AE31D64CC8D00B78274 /* Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = PsiphonTunnel;
-			productName = PsiphonTunnel;
-			productReference = 44980AE51D64CC8D00B78274 /* PsiphonTunnel.framework */;
-			productType = "com.apple.product-type.framework";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		44980ADC1D64CC8D00B78274 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0800;
-				ORGANIZATIONNAME = "Psiphon Inc.";
-				TargetAttributes = {
-					44980AE41D64CC8D00B78274 = {
-						CreatedOnToolsVersion = 8.0;
-						DevelopmentTeam = Q6HLNEX92A;
-						ProvisioningStyle = Automatic;
-					};
-				};
-			};
-			buildConfigurationList = 44980ADF1D64CC8D00B78274 /* Build configuration list for PBXProject "PsiphonTunnel" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-			);
-			mainGroup = 44980ADB1D64CC8D00B78274;
-			productRefGroup = 44980AE61D64CC8D00B78274 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				44980AE41D64CC8D00B78274 /* PsiphonTunnel */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		44980AE31D64CC8D00B78274 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		44980AE01D64CC8D00B78274 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		44980AEB1D64CC8D00B78274 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_SUSPICIOUS_MOVES = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 1;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				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;
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
-				MTL_ENABLE_DEBUG_INFO = YES;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = iphoneos;
-				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
-				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VERSIONING_SYSTEM = "apple-generic";
-				VERSION_INFO_PREFIX = "";
-			};
-			name = Debug;
-		};
-		44980AEC1D64CC8D00B78274 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_SUSPICIOUS_MOVES = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 1;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				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;
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
-				MTL_ENABLE_DEBUG_INFO = NO;
-				SDKROOT = iphoneos;
-				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				VERSIONING_SYSTEM = "apple-generic";
-				VERSION_INFO_PREFIX = "";
-			};
-			name = Release;
-		};
-		44980AEE1D64CC8D00B78274 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_IDENTITY = "";
-				DEFINES_MODULE = YES;
-				DEVELOPMENT_TEAM = Q6HLNEX92A;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				INFOPLIST_FILE = PsiphonTunnel/Info.plist;
-				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = com.psiphon.PsiphonTunnel;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SKIP_INSTALL = YES;
-				SWIFT_VERSION = 3.0;
-			};
-			name = Debug;
-		};
-		44980AEF1D64CC8D00B78274 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_IDENTITY = "";
-				DEFINES_MODULE = YES;
-				DEVELOPMENT_TEAM = Q6HLNEX92A;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				INFOPLIST_FILE = PsiphonTunnel/Info.plist;
-				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = com.psiphon.PsiphonTunnel;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SKIP_INSTALL = YES;
-				SWIFT_VERSION = 3.0;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		44980ADF1D64CC8D00B78274 /* Build configuration list for PBXProject "PsiphonTunnel" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				44980AEB1D64CC8D00B78274 /* Debug */,
-				44980AEC1D64CC8D00B78274 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		44980AED1D64CC8D00B78274 /* Build configuration list for PBXNativeTarget "PsiphonTunnel" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				44980AEE1D64CC8D00B78274 /* Debug */,
-				44980AEF1D64CC8D00B78274 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 44980ADC1D64CC8D00B78274 /* Project object */;
-}

+ 0 - 7
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
-   version = "1.0">
-   <FileRef
-      location = "self:PsiphonTunnel.xcodeproj">
-   </FileRef>
-</Workspace>

BIN
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel.xcodeproj/project.xcworkspace/xcuserdata/eugene.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 46
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel.xcodeproj/xcuserdata/eugene.xcuserdatad/xcschemes/PsiphonTunnel.xcscheme

@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0800"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </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">
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 0 - 22
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel.xcodeproj/xcuserdata/eugene.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -1,22 +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>SchemeUserState</key>
-	<dict>
-		<key>PsiphonTunnel.xcscheme</key>
-		<dict>
-			<key>orderHint</key>
-			<integer>0</integer>
-		</dict>
-	</dict>
-	<key>SuppressBuildableAutocreation</key>
-	<dict>
-		<key>44980AE41D64CC8D00B78274</key>
-		<dict>
-			<key>primary</key>
-			<true/>
-		</dict>
-	</dict>
-</dict>
-</plist>

+ 0 - 24
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel/Info.plist

@@ -1,24 +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>en</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>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleVersion</key>
-	<string>$(CURRENT_PROJECT_VERSION)</string>
-	<key>NSPrincipalClass</key>
-	<string></string>
-</dict>
-</plist>

+ 0 - 19
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel/PsiphonTunnel.h

@@ -1,19 +0,0 @@
-//
-//  PsiphonTunnel.h
-//  PsiphonTunnel
-//
-//  Created by eugene-imac on 2016-08-17.
-//  Copyright © 2016 Psiphon Inc. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-//! Project version number for PsiphonTunnel.
-FOUNDATION_EXPORT double PsiphonTunnelVersionNumber;
-
-//! Project version string for PsiphonTunnel.
-FOUNDATION_EXPORT const unsigned char PsiphonTunnelVersionString[];
-
-// In this header, you should import all the public headers of your framework using statements like #import <PsiphonTunnel/PublicHeader.h>
-
-

+ 0 - 54
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel/PsiphonTunnelController.h

@@ -1,54 +0,0 @@
-//
-//  PsiphonMobile.h
-//  PsiphonMobile
-//
-//  Created by eugene-imac on 2016-08-16.
-//  Copyright © 2016 Psiphon Inc. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-//! Project version number for PsiphonMobile.
-FOUNDATION_EXPORT double PsiphonMobileVersionNumber;
-
-//! Project version string for PsiphonMobile.
-FOUNDATION_EXPORT const unsigned char PsiphonMobileVersionString[];
-
-// In this header, you should import all the public headers of your framework using statements like #import <PsiphonMobile/PublicHeader.h>
-
-
-@protocol TunneledAppProtocol
-- (NSString *) getPsiphonConfig;
-- (void) onDiagnosticMessage: (NSString *) message;
-- (void) onAvailableEgressRegions: (NSArray *) regions;
-- (void) onSocksProxyPortInUse: (NSInteger) port;
-- (void) onHttpProxyPortInUse: (NSInteger) port;
-- (void) onListeningSocksProxyPort: (NSInteger) port;
-- (void) onListeningHttpProxyPort: (NSInteger) port;
-- (void) onUpstreamProxyError: (NSString *) message;
-- (void) onConnecting;
-- (void) onConnected;
-- (void) onHomepage: (NSString *) url;
-- (void) onClientRegion: (NSString *) region;
-- (void) onClientUpgradeDownloaded: (NSString *) filename;
-- (void) onSplitTunnelRegion: (NSString *) region;
-- (void) onUntunneledAddress: (NSString *) address;
-- (void) onBytesTransferred: (long) sent : (long) received;
-- (void) onStartedWaitingForNetworkConnectivity;
-@end
-
-
-@interface PsiphonTunnelController : NSObject
-
-@property (weak) id <TunneledAppProtocol> tunneledAppProtocolDelegate;
-@property (nonatomic) NSInteger listeningSocksProxyPort;
-@property (nonatomic) NSArray *homepages;
-
-
-+ (id) sharedInstance;
-
--(void) startTunnel;
--(void) stopTunnel;
-
-@end

+ 0 - 152
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel/PsiphonTunnelController.m

@@ -1,152 +0,0 @@
-//
-//  PsiphonMobile.m
-//  PsiphonMobile
-//
-//  Created by eugene-imac on 2016-08-16.
-//  Copyright © 2016 Psiphon Inc. All rights reserved.
-//
-
-#import <Psi/Psi.h>
-#import "PsiphonTunnelController.h"
-#import "Reachability.h"
-
-@interface PsiphonTunnelController () <GoPsiPsiphonProvider>
-@end
-
-@implementation PsiphonTunnelController
-
-
-+(PsiphonTunnelController *) sharedInstance {
-    static PsiphonTunnelController *sharedInstance = nil;
-    static dispatch_once_t onceToken = 0;
-    dispatch_once(&onceToken, ^{
-        sharedInstance = [[self alloc] init];
-        // Do any other initialisation stuff here
-    });
-    return sharedInstance;
-}
-
--(void) startTunnel {
-    [self stopTunnel];
-    [[self tunneledAppProtocolDelegate] onDiagnosticMessage:@"starting Psiphon library"];
-    
-    @try {
-        NSString *configStr = [[self tunneledAppProtocolDelegate] getPsiphonConfig];
-        NSError *e = nil;
-        
-        GoPsiStart(
-                   configStr,
-                   @"",
-                   self,
-                   false, // useDeviceBinder
-                   &e);
-    }
-    @catch(NSException *exception) {
-        [[self tunneledAppProtocolDelegate] onDiagnosticMessage:[NSString stringWithFormat: @"failed to start Psiphon library: %@", exception.reason]];
-    }
-    [[self tunneledAppProtocolDelegate] onDiagnosticMessage:@"Psiphon library started"];
-}
-
--(void) stopTunnel {
-    [[self tunneledAppProtocolDelegate] onDiagnosticMessage: @"stopping Psiphon library"];
-    GoPsiStop();
-    [[self tunneledAppProtocolDelegate] onDiagnosticMessage: @"Psiphon library stop"];
-    
-}
-
-#pragma mark - GoPsiphonProvider protocol implementation
-
-- (NSString*)getPrimaryDnsServer {
-    return @"8.8.8.8";
-}
-
-- (NSString*)getSecondaryDnsServer {
-    return @"8.8.4.4";    
-}
-
-
-
-
-- (BOOL)bindToDevice:(long)fileDescriptor error:(NSError**)error {
-    return TRUE;
-}
-
-- (NSString*)getDnsServer {
-    //This method is used only in VPN mode
-    return @"";
-}
-
-- (long)hasNetworkConnectivity {
-    Reachability *reachability = [Reachability reachabilityForInternetConnection];
-    NetworkStatus netstat = [reachability currentReachabilityStatus];
-    return (int) netstat != NotReachable;
-    return 1L;
-    
-}
-
-- (void)notice:(NSString*)noticeJSON {
-    NSData *noticeData = [noticeJSON dataUsingEncoding:NSUTF8StringEncoding];
-    NSError *error = nil;
-    BOOL diagnostic = TRUE;
-    
-    NSDictionary *notice = [NSJSONSerialization JSONObjectWithData:noticeData options:kNilOptions error:&error];
-    
-    if(error) {
-        
-        // TODO: handle JSON error
-        
-    }
-    else {
-        NSString *noticeType = [notice valueForKey:@"noticeType"];
-        if ([noticeType isEqualToString:@"Tunnels"]) {
-            NSInteger count = [[[notice valueForKey: @"data"] valueForKey:@"count"] integerValue];
-            if (count > 0) {
-                [self.tunneledAppProtocolDelegate onConnected];
-            } else {
-                [self.tunneledAppProtocolDelegate onConnecting];
-            }
-            
-        } else if ([noticeType isEqualToString:@"AvailableEgressRegions"]) {
-            NSArray *regions = [[notice valueForKey: @"data"] valueForKey:@"regions"];
-            [self.tunneledAppProtocolDelegate onAvailableEgressRegions:regions];
-        } else if ([noticeType isEqualToString:@"SocksProxyPortInUse"]) {
-            NSInteger port = [(NSNumber*)[[notice valueForKey: @"data"] valueForKey:@"port"] integerValue];
-            [self.tunneledAppProtocolDelegate onSocksProxyPortInUse:port];
-        } else if ([noticeType isEqualToString:@"HttpProxyPortInUse"]) {
-            NSInteger port = [(NSNumber*)[[notice valueForKey: @"data"] valueForKey:@"port"] integerValue];
-            [self.tunneledAppProtocolDelegate onHttpProxyPortInUse:port];
-        } else if ([noticeType isEqualToString:@"ListeningSocksProxyPort"]) {
-            NSInteger port = [(NSNumber*)[[notice valueForKey: @"data"] valueForKey:@"port"] integerValue];
-            [self.tunneledAppProtocolDelegate onListeningSocksProxyPort:port];
-        } else if ([noticeType isEqualToString:@"ListeningHttpProxyPort"]) {
-            NSInteger port = [(NSNumber*)[[notice valueForKey: @"data"] valueForKey:@"port"] integerValue];
-            [self.tunneledAppProtocolDelegate onListeningHttpProxyPort:port];
-        } else if ([noticeType isEqualToString:@"UpstreamProxyError"]) {
-            [self.tunneledAppProtocolDelegate onUpstreamProxyError:[[notice valueForKey: @"data"] valueForKey:@"message"]];
-        } else if ([noticeType isEqualToString:@"ClientUpgradeDownloaded"]) {
-            [self.tunneledAppProtocolDelegate onClientUpgradeDownloaded:[[notice valueForKey: @"data"] valueForKey:@"filename"]];
-        } else if ([noticeType isEqualToString:@"Homepage"]) {
-            [self.tunneledAppProtocolDelegate onHomepage:[[notice valueForKey: @"data"] valueForKey:@"url"]];
-        } else if ([noticeType isEqualToString:@"ClientRegion"]) {
-            [self.tunneledAppProtocolDelegate onClientRegion:[[notice valueForKey: @"data"] valueForKey:@"region"]];
-        } else if ([noticeType isEqualToString:@"UntunneledAddress"]) {
-            [self.tunneledAppProtocolDelegate onUntunneledAddress :[[notice valueForKey: @"data"] valueForKey:@"address"]];
-        } else if ([noticeType isEqualToString:@"BytesTransferred"]) {
-            diagnostic = FALSE;
-            NSDictionary *bytes = [notice valueForKey: @"data"];
-            [self.tunneledAppProtocolDelegate onBytesTransferred:[bytes[@"received"] longValue]:[bytes[@"sent"] longValue]];
-        }
-        
-        if (diagnostic) {
-            NSData *diagnosticData = [NSJSONSerialization dataWithJSONObject:[notice valueForKey: @"data"] options:kNilOptions error:&error];
-            if (error == nil){
-                NSString *diagnosticStr = [[NSString alloc] initWithData:diagnosticData encoding:NSUTF8StringEncoding];
-                NSString *diagnosticMessage = [NSString stringWithFormat:@"%@: %@", noticeType, diagnosticStr];
-                [self. tunneledAppProtocolDelegate onDiagnosticMessage : diagnosticMessage];
-            }
-        }
-    }
-}
-
-@end
-

+ 3 - 0
MobileLibrary/iOS/PsiphonTunnelController/.gitignore

@@ -0,0 +1,3 @@
+project.xcworkspace
+xcuserdata
+build

BIN
MobileLibrary/iOS/PsiphonTunnelController/PsiphonTunnelController.xcodeproj/project.xcworkspace/xcuserdata/eugene.xcuserdatad/UserInterfaceState.xcuserstate