-
Notifications
You must be signed in to change notification settings - Fork 337
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
Use Shadowsocks library instead of launching a subprocess #3474
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 10 of 14 files at r1, all commit messages.
Reviewable status: 10 of 14 files reviewed, all discussions resolved
5edb758
to
f6ab983
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: 9 of 14 files reviewed, 1 unresolved discussion (waiting on @pinkisemils)
talpid-core/src/tunnel/openvpn/mod.rs, line 318 at r1 (raw file):
let handle = runtime.handle().clone(); handle.block_on(Self::new_internal_with_runtime(
This seems sketchy in retrospect: runtime_handle.block_on(f(runtime))
. This task itself will still exist when the runtime is dropped. It works, but it could be cleaner.
I think we should have a TunnelMonitor
trait with async start and wait methods. But I don't want to make a bunch of unrelated changes here.
5c72e1f
to
099c364
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.
Reviewed all commit messages.
Reviewable status: 9 of 14 files reviewed, 1 unresolved discussion (waiting on @pinkisemils)
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 1 of 14 files at r1.
Reviewable status: 10 of 14 files reviewed, 2 unresolved discussions (waiting on @dlon and @pinkisemils)
talpid-core/src/tunnel/mod.rs, line 160 at r3 (raw file):
match proxy { openvpn_types::ProxySettings::Shadowsocks(..) => { return std::env::current_exe().unwrap()
Is this necessary on anything besides Windows? It's still good to have this interface, but if I understand this correctly, the only reason the path for the path to exist is to let the firewall exclude the traffic, right?
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: 10 of 14 files reviewed, 2 unresolved discussions (waiting on @pinkisemils)
talpid-core/src/tunnel/mod.rs, line 160 at r3 (raw file):
Previously, pinkisemils (Emīls Piņķis) wrote…
Is this necessary on anything besides Windows? It's still good to have this interface, but if I understand this correctly, the only reason the path for the path to exist is to let the firewall exclude the traffic, right?
What changes are you proposing? This is still needed to decide whether openvpn.exe
or mullvad-daemon.exe
should be allowed to talk to the first hop.
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 2 of 14 files at r1, 2 of 2 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dlon)
talpid-core/src/tunnel/mod.rs, line 160 at r3 (raw file):
Previously, dlon (David Lönnhager) wrote…
What changes are you proposing? This is still needed to decide whether
openvpn.exe
ormullvad-daemon.exe
should be allowed to talk to the first hop.
Since it's still useful, then I propose that the current code is plenty good enough.
talpid-core/src/tunnel/openvpn/mod.rs, line 318 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
This seems sketchy in retrospect:
runtime_handle.block_on(f(runtime))
. This task itself will still exist when the runtime is dropped. It works, but it could be cleaner.I think we should have a
TunnelMonitor
trait with async start and wait methods. But I don't want to make a bunch of unrelated changes here.
Making it async would be better.
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: complete! all files reviewed, all discussions resolved
099c364
to
5d87ec2
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
5d87ec2
to
c1a4b83
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: 12 of 14 files reviewed, all discussions resolved (waiting on @pinkisemils)
talpid-core/src/tunnel/openvpn/mod.rs, line 318 at r1 (raw file):
Previously, pinkisemils (Emīls Piņķis) wrote…
Making it async would be better.
Done. I've removed the runtime. This could still be improved, but I'll leave that for another PR.
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 2 of 2 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
This updates the Shadowsocks proxy monitor to use the crates instead of launching a subprocess, and removes all related binaries and references to them. It also contains some refactoring of the OpenVPN monitor.
Related PR: mullvad/mullvadvpn-app-binaries#93
This change is