Skip to content

Commit

Permalink
Merge pull request #191 from openziti/tsdk-1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything authored Oct 15, 2024
2 parents a78827a + 29b28f1 commit 1d700b4
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: CI
on:
pull_request:
branches: [ main ]
branches:
- main
- alpha
push:
permissions:
contents: write
Expand Down Expand Up @@ -220,7 +222,7 @@ jobs:
draft-release:
runs-on: ubuntu-latest
needs: [ build ]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha')
steps:
- name: Checkout Project
uses: actions/checkout@v4
Expand All @@ -236,3 +238,4 @@ jobs:
tag: "${{ needs.build.outputs.bundle_short_version }}.${{ needs.build.outputs.bundle_version }}"
name: "v${{ needs.build.outputs.bundle_short_version }}.${{ needs.build.outputs.bundle_version }}"
version: "${{ needs.build.outputs.bundle_short_version }}.${{ needs.build.outputs.bundle_version }}"
prerelease: "${{ github.ref != 'refs/heads/main' }}"
6 changes: 3 additions & 3 deletions Common/IpcMessages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,17 @@ class IpcSetEnabledMessage : IpcMessage {

class IpcSetEnabledResponseMessage : IpcMessage {
enum CodingKeys: String, CodingKey { case code }
var code:Int32?
var code:Int64?

init(_ zid:String, _ code:Int32) {
init(_ zid:String, _ code:Int64) {
let m = Meta(zid, .SetEnabledResponse)
self.code = code
super.init(m)
}
required init(from decoder: Decoder) throws {
try super.init(from: decoder)
let c = try decoder.container(keyedBy: CodingKeys.self)
code = try? c.decode(Int32.self, forKey: .code)
code = try? c.decode(Int64.self, forKey: .code)
}
override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
Expand Down
2 changes: 1 addition & 1 deletion Common/TunnelMgr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class TunnelMgr: NSObject {
}
}

func sendEnabledMessage(_ zid:ZitiIdentity, _ completionHandler: @escaping (Int32) -> Void) {
func sendEnabledMessage(_ zid:ZitiIdentity, _ completionHandler: @escaping (Int64) -> Void) {
guard self.status == .connected else {
completionHandler(0)
return
Expand Down
2 changes: 1 addition & 1 deletion MobilePacketTunnelProvider/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.42</string>
<string>2.43</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>NSExtension</key>
Expand Down
2 changes: 1 addition & 1 deletion MobileShare/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>2.42</string>
<string>2.43</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>NSExtension</key>
Expand Down
4 changes: 2 additions & 2 deletions Network/ZitiTunnelDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,14 @@ class ZitiTunnelDelegate: NSObject, CZiti.ZitiTunnelProvider {
}

// find the lowest MFA timeout set for this identity (if any)
var lowestTimeRemaining:Int32 = Int32.max
var lowestTimeRemaining:Int64 = Int64.max
tzid.services.forEach { svc in
svc.postureQuerySets?.forEach{ pqs in
if pqs.isPassing ?? true {
pqs.postureQueries?.forEach{ pq in
if let qt = pq.queryType, qt == "MFA", let tr = pq.timeoutRemaining, tr > 0, let lua = svc.status?.lastUpdatedAt {
let lastUpdatedAt = Date(timeIntervalSince1970: lua)
let timeSinceLastUpdate = Int32(now.timeIntervalSince(lastUpdatedAt))
let timeSinceLastUpdate = Int64(now.timeIntervalSince(lastUpdatedAt))
let actualTimeRemaining = tr - timeSinceLastUpdate
if actualTimeRemaining < lowestTimeRemaining {
lowestTimeRemaining = actualTimeRemaining
Expand Down
2 changes: 1 addition & 1 deletion PacketTunnelProvider/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.42</string>
<string>2.43</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion ZitiMobilePacketTunnel/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.42</string>
<string>2.43</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
10 changes: 9 additions & 1 deletion ZitiPacketTunnel.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@
5A02AAAB206EBD7E006261C6 = {
isa = PBXGroup;
children = (
AA2098A62C57CC8800BCD073 /* Packages */,
5AF51049258246E60092DC47 /* Configs */,
5AF9C24B226B6FAC009CFD71 /* [email protected] */,
5A8702D722372E7800314199 /* Common */,
Expand Down Expand Up @@ -544,6 +545,13 @@
path = simdata;
sourceTree = "<group>";
};
AA2098A62C57CC8800BCD073 /* Packages */ = {
isa = PBXGroup;
children = (
);
name = Packages;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -1494,7 +1502,7 @@
repositoryURL = "https://github.com/openziti/ziti-sdk-swift-dist.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.30.9;
minimumVersion = 0.40.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/openziti/ziti-sdk-swift-dist.git",
"state" : {
"revision" : "71ad213d745bf1e2079d7fe58423c28cde5ad413",
"version" : "0.30.35"
"revision" : "8c86e2a5383870daa68d84afbe2fff4aece84fd7",
"version" : "0.40.1"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion ZitiPacketTunnel/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.42</string>
<string>2.43</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>LSApplicationCategoryType</key>
Expand Down

0 comments on commit 1d700b4

Please sign in to comment.