From c1be49a164ed67808a6b03d11917127831de3253 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Thu, 18 Oct 2018 13:00:58 +0200 Subject: [PATCH] Add PIA patches support --- .../Services/InfrastructurePreset.swift | 4 +++ Podfile | 5 ++-- Podfile.lock | 27 ++++++++++++------- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Passepartout/Sources/Services/InfrastructurePreset.swift b/Passepartout/Sources/Services/InfrastructurePreset.swift index 540a6ff7..94afdb23 100644 --- a/Passepartout/Sources/Services/InfrastructurePreset.swift +++ b/Passepartout/Sources/Services/InfrastructurePreset.swift @@ -58,6 +58,8 @@ struct InfrastructurePreset: Codable { case keepAliveSeconds = "ping" case renegotiatesAfterSeconds = "reneg" + + case usesPIAPatches = "pia" } let id: String @@ -93,6 +95,7 @@ struct InfrastructurePreset: Codable { builder.compressionFraming = try cfgContainer.decode(SessionProxy.CompressionFraming.self, forKey: .compressionFraming) builder.keepAliveSeconds = try cfgContainer.decodeIfPresent(Int.self, forKey: .keepAliveSeconds) builder.renegotiatesAfterSeconds = try cfgContainer.decodeIfPresent(Int.self, forKey: .renegotiatesAfterSeconds) + builder.usesPIAPatches = try cfgContainer.decodeIfPresent(Bool.self, forKey: .usesPIAPatches) ?? false configuration = builder.build() } @@ -112,5 +115,6 @@ struct InfrastructurePreset: Codable { try cfgContainer.encode(configuration.compressionFraming, forKey: .compressionFraming) try cfgContainer.encodeIfPresent(configuration.keepAliveSeconds, forKey: .keepAliveSeconds) try cfgContainer.encodeIfPresent(configuration.renegotiatesAfterSeconds, forKey: .renegotiatesAfterSeconds) + try cfgContainer.encodeIfPresent(configuration.usesPIAPatches, forKey: .usesPIAPatches) } } diff --git a/Podfile b/Podfile index cc02b39d..15860ad1 100644 --- a/Podfile +++ b/Podfile @@ -2,8 +2,9 @@ source 'https://github.com/cocoapods/specs.git' use_frameworks! def shared_pods - pod 'TunnelKit', '~> 1.1.1' - #pod 'TunnelKit', :git => 'https://github.com/keeshux/tunnelkit', :commit => '1234567' + #pod 'TunnelKit', '~> 1.1.1' + pod 'TunnelKit', :git => 'https://github.com/keeshux/tunnelkit', :commit => '961a30c' + #pod 'TunnelKit', :path => '../tunnelkit' end target 'Passepartout-iOS' do diff --git a/Podfile.lock b/Podfile.lock index 339baee9..8a408657 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -2,33 +2,42 @@ PODS: - MBProgressHUD (1.1.0) - OpenSSL-Apple (1.1.0i-v2) - SwiftyBeaver (1.6.1) - - TunnelKit (1.1.1): - - TunnelKit/AppExtension (= 1.1.1) - - TunnelKit/Core (= 1.1.1) - - TunnelKit/AppExtension (1.1.1): + - TunnelKit (1.1.2): + - TunnelKit/AppExtension (= 1.1.2) + - TunnelKit/Core (= 1.1.2) + - TunnelKit/AppExtension (1.1.2): - SwiftyBeaver - TunnelKit/Core - - TunnelKit/Core (1.1.1): + - TunnelKit/Core (1.1.2): - OpenSSL-Apple (~> 1.1.0h) - SwiftyBeaver DEPENDENCIES: - MBProgressHUD - - TunnelKit (~> 1.1.1) + - TunnelKit (from `https://github.com/keeshux/tunnelkit`, commit `961a30c`) SPEC REPOS: https://github.com/cocoapods/specs.git: - MBProgressHUD - OpenSSL-Apple - SwiftyBeaver - - TunnelKit + +EXTERNAL SOURCES: + TunnelKit: + :commit: 961a30c + :git: https://github.com/keeshux/tunnelkit + +CHECKOUT OPTIONS: + TunnelKit: + :commit: 961a30c + :git: https://github.com/keeshux/tunnelkit SPEC CHECKSUMS: MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9 OpenSSL-Apple: a93b8f2eec8783ff40d9a9304de180ab68bb647c SwiftyBeaver: ccfcdf85a04d429f1633f668650b0ce8020bda3a - TunnelKit: 601b96ec6361ea513ff0ed655ea9c587038912c1 + TunnelKit: 8167e45290d15e2c7c789d8d4c0d5f084f532335 -PODFILE CHECKSUM: 903efc9e8c066aeabc212601779b22a55b1b47e1 +PODFILE CHECKSUM: 2bb8e12281676b8a13ed747e01975b33cbf1986e COCOAPODS: 1.6.0.beta.1