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 DAITA on Linux #6408

Merged
merged 16 commits into from
Jun 26, 2024
Merged

Add DAITA on Linux #6408

merged 16 commits into from
Jun 26, 2024

Conversation

MarkusPettersson98
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 commented Jun 25, 2024

This PR adds DAITA support for the Linux app.

While bringing DAITA to Linux, it paves way for other platforms which use Wireguard-go to also get DAITA support. It does so by introducing the wireguard-go-rs crate, which wraps libwg with the additional methods to enable/disable/configure Maybenot in Wireguard-go while feature-gating all DAITA-related daemon code behind a cfg-variable (conveniently called daita).

Fixes DES-842


This change is Reviewable

Useful for debugging nil derefs in linked Go code and whatnot.

Co-authored-by: Sebastian Holmin <[email protected]>
Copy link

linear bot commented Jun 25, 2024

@MarkusPettersson98 MarkusPettersson98 requested a review from dlon June 25, 2024 15:29
Serock3 and others added 13 commits June 25, 2024 17:31
- Add local wireguard go import
- Activate DAITA and add `wgActivateDaita` and `wgReceiveEvent` FFI
- Implement `start_daita` on Wireguard-go tunnel type
- Mention DAITA in `wireguard-go-rs` description
- Do not compile `wireguard-go-rs` on Windows
- Handle DAITA closed on `nil` event
- Handle daita action timeouts in libwg
- Remove noisy log lines
- Remove `maybenot_on_action` callback
- Remove unused link to `../build/lib` for `talpid-wireguard`
- Bump the `wireguard-go` submodule to a signed release tag in Mullvad's
  `wireguard-go` fork.
- Update path to `libwg/go.sum` in verification script

Also:
- Use u64 instead of *mut void as log context
- Make Tunnel::set_config take a &mut self
- Use dyn Error instead of i32s for wg errors

Co-authored-by: Joakim Hulthe <[email protected]>
Activate the setting when DAITA is enabled and write constant
packet size to WG config string.

Co-authored-by: Sebastian Holmin <[email protected]>
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build
files per platform.
Co-authored-by: David Lönnhager <[email protected]>
- Remove unused android go patch duplicate
- Add mullvad copyright to `libwg_daita.go`
- Fix daita blog link language
Fix the build server scripts for Linux and Android by checking out the
wireguard-go submodule.
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 83 of 83 files at r1, 82 of 82 files at r2, 82 of 82 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

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.

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@MarkusPettersson98 MarkusPettersson98 merged commit 5e31669 into main Jun 26, 2024
67 of 83 checks passed
@MarkusPettersson98 MarkusPettersson98 deleted the daita-wireguard-go branch June 26, 2024 07:48
@dlon dlon mentioned this pull request Jun 26, 2024
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.

4 participants