mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-17 22:19:08 +00:00
Merge branch 'constraint-api-to-app-build'
This commit is contained in:
commit
d6886cad37
13
CHANGELOG.md
13
CHANGELOG.md
@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 1.0 beta 1012 (2018-10-18)
|
||||
|
||||
### Added
|
||||
|
||||
- AES-GCM and new enpoints to PIA network preset.
|
||||
- Disclosure indicators in profile organizer (Samuel Michaels).
|
||||
- Disclaimer for app usage.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Can now import .ovpn files from Apple Files app.
|
||||
- Reject unrecognized values for `cipher`, `auth` and `proto`.
|
||||
|
||||
## 1.0 beta 989 (2018-10-16)
|
||||
|
||||
### Fixed
|
||||
|
@ -27,9 +27,7 @@ import TunnelKit
|
||||
|
||||
class PacketTunnelProvider: TunnelKitProvider {
|
||||
override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) {
|
||||
if let version = GroupConstants.App.version {
|
||||
appVersion = "\(GroupConstants.App.name) \(version)"
|
||||
}
|
||||
appVersion = "\(GroupConstants.App.name) \(GroupConstants.App.versionString)"
|
||||
dnsTimeout = GroupConstants.VPN.dnsTimeout
|
||||
logSeparator = GroupConstants.VPN.sessionMarker
|
||||
super.startTunnel(options: options, completionHandler: completionHandler)
|
||||
|
@ -64,7 +64,7 @@ class AppConstants {
|
||||
}
|
||||
|
||||
class Web {
|
||||
private static let version = "v1"
|
||||
private static let version = "v2"
|
||||
|
||||
private static let baseURL = Repos.passepartoutAPI.appendingPathComponent("api/\(version)")
|
||||
|
||||
|
@ -34,14 +34,11 @@ class GroupConstants {
|
||||
static let title = name
|
||||
// static let title = "\u{1F511}"
|
||||
|
||||
static var version: String? {
|
||||
guard let info = Bundle.main.infoDictionary else {
|
||||
return nil
|
||||
}
|
||||
let versionNumber = info["CFBundleShortVersionString"] as! String
|
||||
let buildNumber = info[kCFBundleVersionKey as String] as! String
|
||||
return "\(versionNumber) (\(buildNumber))"
|
||||
}
|
||||
static let versionNumber = Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String
|
||||
|
||||
static let buildNumber = Int(Bundle.main.infoDictionary![kCFBundleVersionKey as String] as! String)!
|
||||
|
||||
static let versionString = "\(versionNumber) (\(buildNumber))"
|
||||
|
||||
static let teamId = "5357M5NW9W"
|
||||
|
||||
|
@ -46,10 +46,8 @@ struct DebugLog {
|
||||
}
|
||||
|
||||
func decoratedString() -> String {
|
||||
guard let appVersion = GroupConstants.App.version else {
|
||||
fatalError("Could not find bundle app version?")
|
||||
}
|
||||
let appName = GroupConstants.App.name
|
||||
let appVersion = GroupConstants.App.versionString
|
||||
|
||||
var metadata: [String] = []
|
||||
let osVersion: String
|
||||
|
@ -43,6 +43,8 @@ struct Infrastructure: Codable {
|
||||
let preset: String
|
||||
}
|
||||
|
||||
let build: Int
|
||||
|
||||
let name: Name
|
||||
|
||||
let pools: [Pool]
|
||||
|
@ -143,6 +143,14 @@ class InfrastructureFactory {
|
||||
}
|
||||
return
|
||||
}
|
||||
let appBuild = GroupConstants.App.buildNumber
|
||||
guard appBuild >= infra.build else {
|
||||
log.error("Response requires app build >= \(infra.build) (found \(appBuild))")
|
||||
DispatchQueue.main.async {
|
||||
completionHandler(nil, error)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var isNewer = true
|
||||
if let bundleDate = self.bundleModificationDate(for: name) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
BASE=`agvtool what-version -terse`
|
||||
COUNT=`git rev-list --count master`
|
||||
COUNT=`git rev-list --count HEAD`
|
||||
echo $((BASE + COUNT))
|
||||
|
Loading…
Reference in New Issue
Block a user