From 2abb0b5dfc05d20be9b240f6b58fcb80406b7ce5 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Thu, 25 Oct 2018 20:40:22 +0200 Subject: [PATCH] Update Demo code --- Demo/BasicTunnel-iOS/ViewController.swift | 13 +++++++------ Demo/BasicTunnel-macOS/ViewController.swift | 12 +++++++----- Demo/Podfile.lock | 12 ++++++------ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Demo/BasicTunnel-iOS/ViewController.swift b/Demo/BasicTunnel-iOS/ViewController.swift index b411947..6b574ea 100644 --- a/Demo/BasicTunnel-iOS/ViewController.swift +++ b/Demo/BasicTunnel-iOS/ViewController.swift @@ -88,15 +88,16 @@ extension ViewController { let port = UInt16(textPort.text!)! let credentials = SessionProxy.Credentials(textUsername.text!, textPassword.text!) - var builder = TunnelKitProvider.ConfigurationBuilder(ca: ca) + var sessionBuilder = SessionProxy.ConfigurationBuilder(ca: ca) + sessionBuilder.cipher = .aes256gcm + sessionBuilder.digest = .sha1 + sessionBuilder.compressionFraming = .compLZO + sessionBuilder.renegotiatesAfter = nil + sessionBuilder.usesPIAPatches = true + var builder = TunnelKitProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) let socketType: TunnelKitProvider.SocketType = switchTCP.isOn ? .tcp : .udp builder.endpointProtocols = [TunnelKitProvider.EndpointProtocol(socketType, port)] - builder.cipher = .aes256gcm - builder.digest = .sha1 builder.mtu = 1350 - builder.compressionFraming = .compLZO - builder.renegotiatesAfterSeconds = nil - builder.usesPIAPatches = true builder.shouldDebug = true builder.debugLogKey = "Log" diff --git a/Demo/BasicTunnel-macOS/ViewController.swift b/Demo/BasicTunnel-macOS/ViewController.swift index db1890e..13a9c5d 100644 --- a/Demo/BasicTunnel-macOS/ViewController.swift +++ b/Demo/BasicTunnel-macOS/ViewController.swift @@ -88,15 +88,17 @@ extension ViewController { let port = UInt16(textPort.stringValue)! let credentials = SessionProxy.Credentials(textUsername.stringValue, textPassword.stringValue) - var builder = TunnelKitProvider.ConfigurationBuilder(ca: ca) + var sessionBuilder = SessionProxy.ConfigurationBuilder(ca: ca) + sessionBuilder.cipher = .aes128cbc + sessionBuilder.digest = .sha1 + sessionBuilder.compressionFraming = .compLZO + sessionBuilder.renegotiatesAfter = nil + sessionBuilder.usesPIAPatches = true + var builder = TunnelKitProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) // let socketType: TunnelKitProvider.SocketType = isTCP ? .tcp : .udp let socketType: TunnelKitProvider.SocketType = .udp builder.endpointProtocols = [TunnelKitProvider.EndpointProtocol(socketType, port)] - builder.cipher = .aes128cbc - builder.digest = .sha1 builder.mtu = 1350 - builder.compressionFraming = .compLZO - builder.renegotiatesAfterSeconds = nil builder.shouldDebug = true builder.debugLogKey = "Log" diff --git a/Demo/Podfile.lock b/Demo/Podfile.lock index c4e5a6b..3f745b3 100644 --- a/Demo/Podfile.lock +++ b/Demo/Podfile.lock @@ -1,13 +1,13 @@ PODS: - OpenSSL-Apple (1.1.0i-v2) - SwiftyBeaver (1.6.1) - - TunnelKit (1.2.2): - - TunnelKit/AppExtension (= 1.2.2) - - TunnelKit/Core (= 1.2.2) - - TunnelKit/AppExtension (1.2.2): + - TunnelKit (1.3.0): + - TunnelKit/AppExtension (= 1.3.0) + - TunnelKit/Core (= 1.3.0) + - TunnelKit/AppExtension (1.3.0): - SwiftyBeaver - TunnelKit/Core - - TunnelKit/Core (1.2.2): + - TunnelKit/Core (1.3.0): - OpenSSL-Apple (~> 1.1.0h) - SwiftyBeaver @@ -26,7 +26,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: OpenSSL-Apple: a93b8f2eec8783ff40d9a9304de180ab68bb647c SwiftyBeaver: ccfcdf85a04d429f1633f668650b0ce8020bda3a - TunnelKit: 15c88f0cef7b926883566a9455e912a1e55f4048 + TunnelKit: 8e747cac28959ebfdfa4eeab589c933f1856c0fb PODFILE CHECKSUM: f66dfaaa92a8d04ab2743f3caeab0ac9f9f25859