Skip to content

feat: add XPC communication to Network Extension #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jan 30, 2025
Merged

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Jan 23, 2025

No description provided.

@coadler coadler requested a review from ethanndickson January 23, 2025 01:23
@coadler coadler requested a review from ethanndickson January 23, 2025 21:57
@coadler
Copy link
Contributor Author

coadler commented Jan 23, 2025

I implemented communication updates from the NetworkExtension to the App, but it doesn't seem like the network extension is ever fully starting up. I see that it's being started, but never see any logs in startTunnel. It also always prints the following error:

failed to read proto message: Error Domain=SwiftProtobuf.BinaryDecodingError Code=1

@ethanndickson
Copy link
Member

ethanndickson commented Jan 24, 2025

The somewhat good news is that error log is from the Speaker trying to read the start response from the tunnel. You're not seeing the logs in startTunnel because Console.app doesn't show Debug & Info by default.
image
image

Copy link
Member

@ethanndickson ethanndickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the interest of getting this merged, the rest of my review is in the last commit!

Comment on lines 48 to 49
// TODO: better init maybe? kinda wonky
lazy var xpc = VPNXPCInterface(vpn: self)
Copy link
Member

@ethanndickson ethanndickson Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, since it's a chicken & egg problem. The alternative is to use an optional, probably with ! - lazy lets us skip the unwrap.

@ethanndickson ethanndickson merged commit 15f2bcc into main Jan 30, 2025
3 checks passed
@ethanndickson ethanndickson deleted the colin/xpc branch January 30, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants