Update TunnelKit for --remote-random

This commit is contained in:
Davide De Rosa 2019-03-25 10:34:57 +01:00
parent c60a5bf312
commit e00a7f60ce
3 changed files with 11 additions and 7 deletions

View File

@ -60,6 +60,8 @@ public struct InfrastructurePreset: Codable {
case renegotiatesAfterSeconds = "reneg"
case usesPIAPatches = "pia"
case randomizeEndpoint = "random"
}
public let id: String
@ -96,6 +98,7 @@ public struct InfrastructurePreset: Codable {
sessionBuilder.keepAliveInterval = try cfgContainer.decodeIfPresent(TimeInterval.self, forKey: .keepAliveSeconds)
sessionBuilder.renegotiatesAfter = try cfgContainer.decodeIfPresent(TimeInterval.self, forKey: .renegotiatesAfterSeconds)
sessionBuilder.usesPIAPatches = try cfgContainer.decodeIfPresent(Bool.self, forKey: .usesPIAPatches) ?? false
sessionBuilder.randomizeEndpoint = try cfgContainer.decodeIfPresent(Bool.self, forKey: .randomizeEndpoint) ?? false
var builder = TunnelKitProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build())
builder.endpointProtocols = try cfgContainer.decode([EndpointProtocol].self, forKey: .endpointProtocols)
@ -120,5 +123,6 @@ public struct InfrastructurePreset: Codable {
try cfgContainer.encodeIfPresent(configuration.sessionConfiguration.keepAliveInterval, forKey: .keepAliveSeconds)
try cfgContainer.encodeIfPresent(configuration.sessionConfiguration.renegotiatesAfter, forKey: .renegotiatesAfterSeconds)
try cfgContainer.encodeIfPresent(configuration.sessionConfiguration.usesPIAPatches, forKey: .usesPIAPatches)
try cfgContainer.encodeIfPresent(configuration.sessionConfiguration.randomizeEndpoint, forKey: .randomizeEndpoint)
}
}

View File

@ -5,8 +5,8 @@ use_frameworks!
def shared_pods
#pod 'TunnelKit', '~> 1.5.0'
#pod 'TunnelKit/LZO', '~> 1.5.0'
pod 'TunnelKit', :git => 'https://github.com/keeshux/tunnelkit', :commit => '04fbbb1'
pod 'TunnelKit/LZO', :git => 'https://github.com/keeshux/tunnelkit', :commit => '04fbbb1'
pod 'TunnelKit', :git => 'https://github.com/keeshux/tunnelkit', :commit => '17b7aee'
pod 'TunnelKit/LZO', :git => 'https://github.com/keeshux/tunnelkit', :commit => '17b7aee'
#pod 'TunnelKit', :path => '../../personal/tunnelkit'
#pod 'TunnelKit/LZO', :path => '../../personal/tunnelkit'
end

View File

@ -15,8 +15,8 @@ PODS:
DEPENDENCIES:
- MBProgressHUD
- TunnelKit (from `https://github.com/keeshux/tunnelkit`, commit `04fbbb1`)
- TunnelKit/LZO (from `https://github.com/keeshux/tunnelkit`, commit `04fbbb1`)
- TunnelKit (from `https://github.com/keeshux/tunnelkit`, commit `17b7aee`)
- TunnelKit/LZO (from `https://github.com/keeshux/tunnelkit`, commit `17b7aee`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
@ -26,12 +26,12 @@ SPEC REPOS:
EXTERNAL SOURCES:
TunnelKit:
:commit: 04fbbb1
:commit: 17b7aee
:git: https://github.com/keeshux/tunnelkit
CHECKOUT OPTIONS:
TunnelKit:
:commit: 04fbbb1
:commit: 17b7aee
:git: https://github.com/keeshux/tunnelkit
SPEC CHECKSUMS:
@ -40,6 +40,6 @@ SPEC CHECKSUMS:
SwiftyBeaver: 8e67ab3cd94389cbbb7a9c7cc02748d98bfee68e
TunnelKit: fb4db4d4c4b36af0ca8e973e3345a1c3ef5ac85c
PODFILE CHECKSUM: 1b84c62ece95cae765c64491d65dab9333db2381
PODFILE CHECKSUM: 082d690f87529388ee247f4f651b2fd1b69659bd
COCOAPODS: 1.6.1