summaryrefslogtreecommitdiffhomepage
path: root/talpid-wireguard
AgeCommit message (Collapse)AuthorFilesLines
2024-06-28Remove pointless firewall updateDavid Lönnhager2-56/+46
2024-06-26Enable DAITA on macOSDavid Lönnhager1-2/+2
2024-06-25Link statically against libwgMarkus Pettersson1-1/+1
Co-authored-by: David Lönnhager <david.l@mullvad.net>
2024-06-25Add `daita` as a Cargo cfg variableMarkus Pettersson8-33/+72
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build files per platform.
2024-06-25Enable constant packet size for wireguard-goMarkus Pettersson2-1/+5
Activate the setting when DAITA is enabled and write constant packet size to WG config string. Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
2024-06-25Use Wireguard-go when DAITA is enabledMarkus Pettersson3-18/+53
2024-06-25Add a safe FFI wrapper in `wireguard-go-rs`Sebastian Holmin10-235/+179
- 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 <joakim@hulthe.net>
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin1-5/+7
2024-05-29Migrate to gRPCDavid Göransson1-3/+14
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net>
2024-05-07Check wireguard-go configurationDavid Lönnhager1-1/+6
2024-04-25Fix use of deprecated socket2 functionJoakim Hulthe1-1/+1
2024-04-25Update windows-sysJoakim Hulthe1-4/+2
2024-04-25Run cargo update + use new base64Joakim Hulthe1-1/+0
2024-04-22Fix broken lints in rustdocsSebastian Holmin1-7/+7
I ran `cargo doc` and fixed as many broken links as I could find.
2024-04-16Add DAITA to relay selectionDavid Lönnhager1-1/+1
2024-04-16Add DAITA Windows client and updated tuncfgDavid Lönnhager6-46/+695
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson1-2/+1
Implement a system built on 'queries' for selecting appropriate relays. A query is a set of constraints which dictates which relay(s) that *can* be chosen by the relay selector. The user's settings can naturally be expressed as a query. The semantics of merging two queries in a way that always prefer user settings is defined by the new `Intersection` trait. Split `mullvad-relay-selector` into several modules: - `query.rs`: Definition of a query on different types of relays. This module is integral to the new API of `mullvad-relay-selector` - `matcher.rs`: Logic for filtering out candidate relays based on a query. - `detailer.rs`: Logic for deriving connection details for the selected relay. - `tests/`: Integration tests for the new relay selector. These tests only use the public APIs of `RelaySelector` and make sure that the output matches the expected output in different scenarios.
2024-03-14Simplify route manager handleDavid Lönnhager1-1/+1
2024-03-13Fix cross-checking talpid-wireguard for windowsJoakim Hulthe1-2/+3
The `wireguard_go` cfg shouldn't be included when compiling towards windows. This change makes `cargo c --target x86_64-pc-windows-gnu` work on linux again.
2024-03-13Stop connectivity monitor when stats map is emptyDavid Lönnhager1-1/+8
This occurs when the WireGuard device is closed unexpectedly
2024-02-27Use `tokio::time::pause` to mock time in testsSebastian Holmin2-117/+138
2024-02-27Make `max_ping_size` only take `FuturesUnordered` instead of being genericSebastian Holmin1-31/+64
2024-02-27Add unit test for MTU detectionSebastian Holmin1-39/+156
Split MTU detection into an inner pure function `max_ping_sized` and an outer function `detect_mtu` and add unit and prop-testing to the non io-dependent parts.
2024-02-27Replace err_derive with thiserrorJoakim Hulthe13-152/+144
`err_derive` is unmaintained and will probably stop working with rust edition 2024. `thiserror` is almost a drop-in replacement. This commit simply replaces all occurences of `derive(err_derive::Error)` with `derive(thiserror::Error)` and fixes the attributes, but the Error and Display impls should be identical.
2024-02-19Fix redundant importsDavid Lönnhager2-4/+1
2024-02-13Fix MTU detection below min IPv6 value for windowsSebastian Holmin1-3/+19
2024-02-12Move MTU detection to separate moduleSebastian Holmin2-177/+209
2024-02-12Enable MTU detection on macosSebastian Holmin1-7/+7
2024-02-12Increase socket buffer size for MTU pinger on macosDavid Lönnhager1-3/+20
2024-02-12Fix `talpid_wireguard::unix::set_mtu` for macosSebastian Holmin2-2/+7
2024-02-09Add windows MTU detection implementation.Sebastian Holmin2-12/+29
2024-02-09Fix type mismatch in pointer cast on ARMMarkus Pettersson1-1/+1
2024-02-08Add `proptest` dependencySebastian Holmin2-5/+30
2024-02-08Enable automatic MTU detection on linuxSebastian Holmin1-0/+30
2024-02-08Refactor default MTU calculationSebastian Holmin1-10/+8
2024-02-08Add automatic MTU detectionSebastian Holmin2-0/+104
2024-02-08Add `set_mtu` for linuxSebastian Holmin2-0/+43
2024-02-08Move constantsSebastian Holmin1-6/+4
2024-02-08Fix typosSebastian Holmin3-2/+4
2024-01-31Simplify retry logic in connecting stateDavid Lönnhager2-2/+34
2024-01-31Coalesce tunnel device errors on WindowsDavid Lönnhager2-1/+6
2024-01-25Set default route MTU when using multihop on macOS. This prevents fragmentationDavid Lönnhager1-8/+13
2024-01-25Hardcode a low MTU/MSS for the tunnel config client socketDavid Lönnhager1-54/+6
2024-01-16Add rust-version to all Cargo.tomlLinus Färnstrand1-0/+1
2024-01-09Remove version and publish cargo metadataLinus Färnstrand1-2/+0
Since Rust 1.75.0 the `version` field is optional. The version defaults to "0.0.0" if it's not specified, and `publish` defaults to false if no version has been given. So by not specifying a version we get both `version = "0.0.0" and `publish = false` "for free"
2024-01-04Add workspace level lintsLinus Färnstrand2-1/+2
2023-12-04Remove hidden assumptions from WireGuard configDavid Lönnhager5-91/+85
2023-12-04Subtract multihop overhead from default route MTU on LinuxDavid Lönnhager1-0/+27
2023-12-01Rename MULLVAD_INTERFACE_NAMEStephen Huan1-1/+1
2023-11-13Remove unnecessary closureSebastian Holmin1-1/+1