mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Previously, we called `onDisconnect` in two kinds of situations: - With an error when we wanted the clients to clear the token - Without an error when the token was still valid (i.e. after a call to `disconnect` from the clients) This is unnecessarily redundant. Firezone is designed to **not** have a state of "signed in but disconnected". Thus, every time connlib calls `disconnect`, we should clear the token and sign the user out. At present, we only do this for errors with the control plane. Errors in the actual tunnel are only logged and we continue trying to use the tunnel. There are errors in the tunnel where we should also give up (i.e. TUN device gone, fatal IO error, etc). At present, those are not yet bubbled up but we will at some point. Once we have https://github.com/firezone/firezone/pull/3682, it will be much easier to create a type-safe contract that ensures we only disconnect on fatal errors. --------- Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com> Co-authored-by: ReactorScram <ReactorScram@users.noreply.github.com>
Rust development guide
Firezone uses Rust for all data plane components. This directory contains the Linux and Windows clients, and low-level networking implementations related to STUN/TURN.
We target the last stable release of Rust using rust-toolchain.toml.
If you are using rustup, that is automatically handled for you.
Otherwise, ensure you have the latest stable version of Rust installed.