feat: pass agent updates to UI#35
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Updated from coder/coder
| PRODUCT_BUNDLE_IDENTIFIER: com.coder.Coder-Desktop.CoderSDKTests | ||
|
|
||
| VPNXPC: | ||
| type: framework |
There was a problem hiding this comment.
Now that we import VPNLib into the app for the peer update protobuf type, we might as well just put the contents of this framework there.
| guard uuidData.count == 16 else { | ||
| return nil | ||
| } | ||
| var uuid: uuid_t = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) |
There was a problem hiding this comment.
Very funny: there's no fixed size arrays in Swift (probably cause of objc), so uuid_t is just a tuple of 16 u8s.
Also, the proposal to add one includes calling that new type a Vector https://forums.swift.org/t/second-review-se-0453-vector-a-fixed-size-array/76412/20
| logger.error("network extension reported error: \(error)") | ||
| tunnelState = .failed(.internalError(error.localizedDescription)) | ||
| extension CoderVPNService { | ||
| @objc private func vpnDidUpdate(_ notification: Notification) { |
There was a problem hiding this comment.
macOS can tell us when the Network Extension changes state, including if there was an error that caused it to disconnect, e.g. NE crashes, ptp.cancelTunnelWithError, start/stop completionHandler(err)
3470cf0 to
156f4e0
Compare

Closes #5.