-
Notifications
You must be signed in to change notification settings - Fork 8
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
Refactor shared mixnet client and tun provider #1731
base: develop
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.
Reviewed 37 of 45 files at r1.
Reviewable status: 37 of 45 files reviewed, 4 unresolved discussions (waiting on @doums, @neacsu, @octol, @rokas-ambrazevicius, and @zaneschepke)
nym-vpn-core/crates/nym-mixnet-client/src/lib.rs
line 23 at r1 (raw file):
} impl SharedMixnetClient {
Nit: oh I'd be happy to get rid of this type as it holds Arc<Mutex<>> and does a lot of unwrapping. Personally I'd for channel instead to keep it safe.
nym-vpn-core/crates/nym-mixnet-client/src/lib.rs
line 26 at r1 (raw file):
pub fn new( mixnet_client: MixnetClient, #[cfg(target_os = "android")] tun_provider: Arc<dyn AndroidTunProvider>,
I think it would be much simpler to pass Fn(RawFd)
instead of AndroidTunProvider
which should reduce cross-module dependencies.
nym-vpn-core/Cargo.toml
line 14 at r1 (raw file):
"crates/nym-ip-packet-client", "crates/nym-mixnet-client", "crates/nym-routing", "crates/nym-tunnel-provider",
nit: add newline between crates
nym-vpn-core/crates/nym-vpn-lib/src/tunnel_state_machine/tunnel/mod.rs
line 48 at r1 (raw file):
impl ConnectedMixnet { /// Returns the websocket fd owned by mixnet client.
Please fix documentation
34997d0
to
d92ac25
Compare
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.
Reviewable status: 23 of 45 files reviewed, 3 unresolved discussions (waiting on @doums, @octol, @pronebird, @rokas-ambrazevicius, and @zaneschepke)
nym-vpn-core/crates/nym-mixnet-client/src/lib.rs
line 26 at r1 (raw file):
Previously, pronebird (Andrej Mihajlov) wrote…
I think it would be much simpler to pass
Fn(RawFd)
instead ofAndroidTunProvider
which should reduce cross-module dependencies.
Did this in the separated PR, thanks for the idea.
nym-vpn-core/crates/nym-vpn-lib/src/tunnel_state_machine/tunnel/mod.rs
line 48 at r1 (raw file):
Previously, pronebird (Andrej Mihajlov) wrote…
Please fix documentation
Done.
This change is