Skip to content
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

Move encrypted DNS state to crate shared between iOS and everyeone else #7008

Conversation

MarkusPettersson98
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 commented Oct 18, 2024

Move the Encrypted DNS config selection algorithm to the mullvad-encrypted-dns-proxy crate where both mullvad-ios and mullvad-daemon can consume it.


This change is Reviewable

Copy link

linear bot commented Oct 18, 2024

@MarkusPettersson98
Copy link
Contributor Author

Maybe it makes more sense to name the state module cache instead? 🤔

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)


mullvad-encrypted-dns-proxy/src/state.rs line 34 at r1 (raw file):

    /// Select a config.
    /// Always select an obfuscated configuration, if there are any left untried. If no obfuscated
    /// configurations exist, try plain configurations. The order is randomized due to the hash set

Nit: The fact that hash sets are used sounds like an implementation detail. Maybe it should not be mentioned here.

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it makes more sense to name the state module cache instead? 🤔

Not to bikeshed, but I guess that this module has two responsibilities: (1) owning a cache, (2) keeping track of used configs. Maybe "state" is vague enough to encompass both?

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)

@MarkusPettersson98 MarkusPettersson98 force-pushed the move-config-selection-algorithm-out-of-mullvad-ios-des-1320 branch from 19b670d to bf6d358 Compare October 18, 2024 11:39
Copy link
Contributor Author

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, point 2 would make 'cache' misleading.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dlon)


mullvad-encrypted-dns-proxy/src/state.rs line 34 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

Nit: The fact that hash sets are used sounds like an implementation detail. Maybe it should not be mentioned here.

I agree that it an implementation detail, but this is something we would like to change eventually. Making it as visible as possible might make us consider changing it sooner rather than later 🤷 ?

@MarkusPettersson98 MarkusPettersson98 merged commit f9b3226 into main Oct 18, 2024
52 of 53 checks passed
@MarkusPettersson98 MarkusPettersson98 deleted the move-config-selection-algorithm-out-of-mullvad-ios-des-1320 branch October 18, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants