Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Update Demo code
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Oct 25, 2018
1 parent 917427f commit 2abb0b5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
13 changes: 7 additions & 6 deletions Demo/BasicTunnel-iOS/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
12 changes: 7 additions & 5 deletions Demo/BasicTunnel-macOS/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
12 changes: 6 additions & 6 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -26,7 +26,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
OpenSSL-Apple: a93b8f2eec8783ff40d9a9304de180ab68bb647c
SwiftyBeaver: ccfcdf85a04d429f1633f668650b0ce8020bda3a
TunnelKit: 15c88f0cef7b926883566a9455e912a1e55f4048
TunnelKit: 8e747cac28959ebfdfa4eeab589c933f1856c0fb

PODFILE CHECKSUM: f66dfaaa92a8d04ab2743f3caeab0ac9f9f25859

Expand Down

0 comments on commit 2abb0b5

Please sign in to comment.