-
Notifications
You must be signed in to change notification settings - Fork 3
Add connlib basic implementation #18
base: master
Are you sure you want to change the base?
Conversation
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.
Just did a quick first pass. Looking good, just want to drop a subtle reminder to follow boringtun's licensing requirements where appropriate before this gets merged / shipped.
Oh good catch 👍 |
This commit convert this repo into a rust workspace. Divides into 2 types of crates, libs/clients. Clients are thin wrappers used directly by native clients. Libs implement the logic. We have 4 logic crates: - Gateway: Gateway-specific logic. - Clients: Client-specific logic. - Tunnel: General logic for wireguard/ice tunnels. - Common: Types shared by all crates.
50d80a4
to
7bdf40f
Compare
@jamilbk could you double check if this copyright notice is enough? |
adding @roop for visibility on the Apple FFI bridge |
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.
Thanks @francesca64 for the thorough review! In the main repo we use codespell + precommit to catch typos like these, noting here in case it's useful
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Adding @timClicks for a review on organization/structure. @timClicks -- probably will need a call to provide more context around Connlib but it's meant to be our core networking library used across Apple/Android/Windows/Linux. This may be helpful as well: |
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Co-authored-by: Francesca Lovebloom <[email protected]> Signed-off-by: Gabi <[email protected]>
Having With this PR, how should the Swift code tell the Ruby code about the callback handlers to be called? (Previously, we passed in a CallbackHandler struct with functions.) Apart from that, I think we should add the following callback handlers in the FFI:
|
Overview
This PRs establish a basis on which to build on for connlib, this doesn't try to be a working version of connlib.
This PR tries to:
There's still a lot to do, there are quite a few "TODO"s in the code but here are some general things
on_error
is called, so it candisconnect
theSession
, this will not always be the case and we need to disconnect the session from Rust.This changes are only tested to be compiled not to be working but creating the PR now so that we don't keep bloating the PR.
Crate structure
We have 2 big directories:
libs
: libraries that have buisness logicclients
: are the outter shells that directly interact with outside code (or are directly a binary)gateway
: Contains the actual gateway binaryThese are self-explainatory save for directories in
libs
:common
: have types shared by all connlib.tunnel
: is the actual data-plane logic.client
: buisness logic specific for clients.gateway
: buisness logic specific for gateway.Platform specific behavior
For now, only linux and macos have an implementation and we are directly using boringtun's device although moving to our own implementation won't be hard.
Next steps
My next step is making it actually work with the portal, for that I'll fix the gateway binary and make a simple headless client.
Once that is done we can start working on client-specific ffi and be sure that it is working.