-
Notifications
You must be signed in to change notification settings - Fork 339
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
Remove dependency on relay selector from tunnel actor #5261
Conversation
IOS-339 Remove dependency on relay selector from tunnel actor
We don't use all of the information provided by So introducing a type with stricter requirements and exposing it from
|
4003ad6
to
8e259a2
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 12 of 19 files at r1, 7 of 7 files at r2, all commit messages.
Reviewable status: 19 of 20 files reviewed, 2 unresolved discussions (waiting on @pronebird)
ios/MullvadVPN.xcodeproj/project.pbxproj
line 2672 at r2 (raw file):
isa = PBXGroup; children = ( 5819ABC22A8CF02C007B59A6 /* TunnelAdapterProtocol.swift */,
Nit
Can we reorder those files to be in alphabetical order ?
ios/PacketTunnelCore/IPC/PacketTunnelOptions.swift
line 18 at r2 (raw file):
case selectedRelay = "selected-relay" /// Option key that holds the `NSNumber` value, which is when set to `1` indicates that
nit
/// Option key that holds an `NSNumber` value, which, when set to `1` indicates that
/// the tunnel was started by the system.
8e259a2
to
e8b4974
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 7 files at r2.
Reviewable status: 17 of 20 files reviewed, all discussions resolved (waiting on @buggmagnet)
ios/MullvadVPN.xcodeproj/project.pbxproj
line 2672 at r2 (raw file):
Previously, buggmagnet wrote…
Nit
Can we reorder those files to be in alphabetical order ?
Done but keep in mind that this change might lead likely to merge conflicts in outstanding PRs.
ios/PacketTunnelCore/IPC/PacketTunnelOptions.swift
line 18 at r2 (raw file):
Previously, buggmagnet wrote…
nit
/// Option key that holds an `NSNumber` value, which, when set to `1` indicates that /// the tunnel was started by the system.
Done.
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 19 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
c3b337b
to
26e7810
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 13 of 19 files at r1, 5 of 7 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
ce157f6
to
cedef94
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 2 of 2 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
…laySelector module Also: - IPC: accept NextRelay in "reconnect" message - Fix dependency on MullvadREST (instead of MullvadTransport)
cedef94
to
c731b04
Compare
Currently
RelaySelectorResult
(a part of RelaySelector module) is used across different parts of tunnel manager <-> tunnel actor.RelaySelectorResult
itself is produced byRelaySelector
and passed as is from tunnel manager into actor via IPC to initiate connection, here is how the data layout looks like:Then over time the tunnel manager receives a slice of that data via
PacketTunnelRelay
as it polls tunnel status:In reality however, actor does not need the entire
RelaySelectorResult
, it would be enough to receive a type holding the following info instead:Changes
RelaySelectorResult
withSelectedRelay
in IPC/Actor interaction and subsequently removes dependency onRelaySelector
in the actor.NextRelay
type instead ofRelaySelectorResult?
viareconnectTunnel()
IPC method.This change is