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

Add Windows/wireguard-nt support for DAITA #6122

Merged
merged 18 commits into from
Apr 16, 2024
Merged

Add Windows/wireguard-nt support for DAITA #6122

merged 18 commits into from
Apr 16, 2024

Conversation

dlon
Copy link
Member

@dlon dlon commented Apr 15, 2024

Fix DES-790.

This change is Reviewable

@dlon dlon requested a review from MarkusPettersson98 April 15, 2024 07:48
Copy link

linear bot commented Apr 15, 2024

@dlon dlon marked this pull request as ready for review April 15, 2024 08:02
Copy link
Contributor

@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.

Reviewed 44 of 69 files at r1, 1 of 2 files at r2.
Reviewable status: 45 of 70 files reviewed, 3 unresolved discussions (waiting on @dlon)


mullvad-relay-selector/src/relay_selector/mod.rs line 750 at r2 (raw file):

        // step.
        let mut exit_relay_query = query.clone();
        exit_relay_query.wireguard_constraints.daita = Constraint::Any;

Why is the exit relay query modified here? If it can't be modified earlier/elsewhere, please leave a comment detailing why daita is set to Constraint::Any 😊

Code quote:

        let mut exit_relay_query = query.clone();
        exit_relay_query.wireguard_constraints.daita = Constraint::Any;

mullvad-relay-selector/src/relay_selector/query.rs line 183 at r2 (raw file):

        AdditionalWireguardConstraints {
            daita: value.daita.unwrap_or(false),
        }

Would it make sense to use AdditionalWireguardConstraints::default instead of specifying false? 😊

AdditionalWireguardConstraints {
    daita: value.daita.unwrap_or(AdditionalWireguardConstraints::default().daita),
}

Code quote:

        AdditionalWireguardConstraints {
            daita: value.daita.unwrap_or(false),
        }

mullvad-relay-selector/tests/relay_selector.rs line 1223 at r2 (raw file):

        "got".to_owned(),
        "se9-wireguard".to_owned(),
    );

Tip: hostname

Code quote:

    let daita_supporting_relay = GeographicLocationConstraint::Hostname(
        "se".to_owned(),
        "got".to_owned(),
        "se10-wireguard".to_owned(),
    );
    let nondaita_supporting_relay = GeographicLocationConstraint::Hostname(
        "se".to_owned(),
        "got".to_owned(),
        "se9-wireguard".to_owned(),
    );

talpid-tunnel-config-client/src/lib.rs line 126 at r2 (raw file):

    enable_post_quantum: bool,
    enable_daita: bool,
) -> Result<EphemeralPeer, Error> {

Could we merge request_ephermal_peer and request_ephermal_peer_with_opts? 😄

Code quote:

pub async fn request_ephemeral_peer(
    service_address: IpAddr,
    parent_pubkey: PublicKey,
    ephemeral_pubkey: PublicKey,
    enable_post_quantum: bool,
    enable_daita: bool,
) -> Result<EphemeralPeer, Error> {
    request_ephemeral_peer_with_opts(
        service_address,
        parent_pubkey,
        ephemeral_pubkey,
        enable_post_quantum,
        enable_daita,
    )
    .await
}

pub async fn request_ephemeral_peer_with_opts(
    service_address: IpAddr,
    parent_pubkey: PublicKey,
    ephemeral_pubkey: PublicKey,
    enable_post_quantum: bool,
    enable_daita: bool,
) -> Result<EphemeralPeer, Error> {

@dlon dlon force-pushed the add-wg-nt-daita branch from aa1f17a to 10122ef Compare April 16, 2024 12:15
Copy link
Contributor

@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.

:lgtm:

Reviewed 3 of 5 files at r5.
Reviewable status: 43 of 70 files reviewed, all discussions resolved

@dlon dlon force-pushed the add-wg-nt-daita branch from 10122ef to 9570820 Compare April 16, 2024 12:39
@dlon dlon force-pushed the add-wg-nt-daita branch from 9570820 to 1832ccc Compare April 16, 2024 12:43
@dlon dlon merged commit 58dadaa into main Apr 16, 2024
51 of 53 checks passed
@dlon dlon deleted the add-wg-nt-daita branch April 16, 2024 12: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.

3 participants