- Notifications
You must be signed in to change notification settings - Fork3
chore: add network extension manager#18
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ethanndickson commentedJan 8, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed byGraphite. Learn more aboutstacking. |
617a941
to300889e
Compare@@ -4,16 +4,200 @@ import VPNLib | |||
actor Manager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think this is worth unit testing, at least right now. We'd need to mock the PTP, the TunnelHandle, the validator, and eventually the XPC speaker, all for a relatively simple abstraction that's mostly error handling.
// This can't be checked at compile-time, as both Tasks & Continuations can only ever throw | ||
// a type-erased `Error` |
ethanndicksonJan 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is a little frustrating - theTask
type itself is generic on two type parameters,Success
andFailure
, but the only APIs you can await on a task are eithervalue
with an untypedthrows
orresult
which returns a type-erasedany Error
error variant. It's very similar for continuations, the type itself is generic but there's no way to return that typed error.
As an aside, I think I'm becoming more of a fan, for binaries at least, of just having a single opaque error type, propagating it with context, and then just displaying it, ala Go or Rust'sanyhow
- it's so rare that one or more of the error variants are recoverable, and that the caller needs to know which one.
4922fcf
to7e24349
Compare@coadler Requesting your review here since Spike is OOO, and this is pretty relevant to you. This is the portion of the network extension that communicates over XPC. |
6d7d67a
to8964672
Compare4d0b3da
to161e5c2
Compare8964672
to8b80132
Compare8ca39b4
to279f004
Compareethanndickson commentedJan 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
46c2c09
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Relates to#2.
Adds the
Manager
abstraction that:SignatureValidator
on a downloaded dylibNEPacketTunnelProvider
TunnelHandle
Speaker
Eventually, it'll act as the middleman between the tunnel Speaker and the XPC speaker.