summaryrefslogtreecommitdiffhomepage
path: root/talpid-wireguard/src/lib.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-01-14Add route to obfuscator if necessaryMarkus Pettersson1-1/+1
2025-01-07Fix bug where `block_on` was called from an async contextMarkus Pettersson1-4/+22
2024-12-20Remove unwrapSebastian Holmin1-1/+2
2024-12-20Add `log_tunnel_data_usage` to Android tooSebastian Holmin1-3/+11
2024-12-20Add logging for ephemeral peer negotiation timeouts on WindowsSebastian Holmin1-2/+29
2024-12-20Revert `force_wireguard_handshake` because it was brokenMarkus Pettersson1-2/+0
2024-12-18Force WireGuard handshake before PQ handshakeDavid Lönnhager1-0/+2
2024-12-12Use dynamic DAITA machines in wireguard-goDavid Lönnhager1-13/+8
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2024-12-02Replace generic with new typeSebastian Holmin1-39/+35
2024-12-02Replace dyn fn with genericSebastian Holmin1-25/+20
2024-12-02Make tunnel connection errors recoverableKalle Lindström1-9/+0
2024-11-22Check that that tunnel can serve traffic after starting a new tunnelKalle Lindström1-67/+60
- Split up "ConnectivityCheck" into more descriptive types and collect them in a new `connectivity` module. - Fix allow Wireguard-Go tunnel setup to be cancelled - Use retry param in connectivity check
2024-11-22Fix a lot of thingsMarkus Pettersson1-55/+35
- Fix remaining rustc warnings on non-Android platforms - Fix lookup entry peer if it exists in wireguard-go - Fix talpid-wireguard not compiling on windows - Fix entry peer config code - Fix clippy issue - Fix Daita - Remove TODOs
2024-11-22Add multihop negotiation with ephemeral peersKalle Lindström1-23/+51
Use `WgGoTunnel` directly on Android because a specialized implemenation of `set_config` has to be used.
2024-11-22Split up platform specific `start_tunnel` functionsMarkus Pettersson1-0/+28
2024-10-24Fix endpoint addr routeDavid Lönnhager1-2/+2
2024-10-23Do not adjust MTU at all if user has overridden itDavid Lönnhager1-6/+12
2024-10-23Move MTU adjustment into talpid-wireguardDavid Lönnhager1-4/+85
2024-10-21Take obfuscation overhead into account when setting MTUJoakim Hulthe1-1/+8
2024-10-17Fix obfuscation not being applied properly on tunnel creationDavid Göransson1-9/+10
2024-09-24Move ephemeral negotiation to own moduleDavid Lönnhager1-200/+4
2024-09-24Lower MTU during ephemeral peer negotiation on WindowsDavid Lönnhager1-0/+27
2024-09-23Generalize error that could occur while negotiating an ephemeral peerMarkus Pettersson1-8/+10
2024-09-20Refactor obfuscation setupDavid Lönnhager1-145/+28
2024-09-18Fix bug where allowed ips would not be patched if DAITA was enabledMarkus Pettersson1-4/+6
2024-09-18Fix negotiation of ephemeral peer failing due to timeoutMarkus Pettersson1-24/+188
Address a race condition in `WireguardMonitor::start` where a Wireguard-GO tunnel would be started but try to serve traffic before actually being ready to do so. This is probably a latent issue on all platforms using Wireguard-GO, but it was mostly noticeable on Android.
2024-09-02Fix a lingering panic by using a stricter typeMax Zettlmeißl1-1/+1
The functions `request_ephemeral_peer` and consecutively `new_client` accepted an `IpAddr`, but due to only ever preparing a v4 socket this lead to panic due to an `EAFNOSUPPORT` error if an IPv6 was provided. It would also have made sense to change `new_client` to create either an IPv4 or IPv6 socket depending on the type of the address, but the tuncfg service is currently not accepting IPv6 connections, therefore this was the cleaner change.
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager1-5/+3
2024-08-20Move MTU helpers to talpid-net crateDavid Lönnhager1-2/+0
2024-08-16Add Shadowsocks obfuscation support to mullvad-daemonDavid Lönnhager1-42/+58
2024-08-16Add Shadowsocks to tunnel-obfuscation crateDavid Lönnhager1-2/+2
2024-06-28Remove pointless firewall updateDavid Lönnhager1-52/+40
2024-06-25Add `daita` as a Cargo cfg variableMarkus Pettersson1-9/+10
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build files per platform.
2024-06-25Enable constant packet size for wireguard-goMarkus Pettersson1-1/+1
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 Pettersson1-17/+48
2024-06-25Add a safe FFI wrapper in `wireguard-go-rs`Sebastian Holmin1-22/+35
- 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-04-16Add DAITA to relay selectionDavid Lönnhager1-1/+1
2024-04-16Add DAITA Windows client and updated tuncfgDavid Lönnhager1-33/+70
2024-03-14Simplify route manager handleDavid Lönnhager1-1/+1
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-42/+40
`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-12Move MTU detection to separate moduleSebastian Holmin1-177/+16
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-09Add windows MTU detection implementation.Sebastian Holmin1-11/+28
2024-02-08Add `proptest` dependencySebastian Holmin1-5/+27
2024-02-08Enable automatic MTU detection on linuxSebastian Holmin1-0/+30
2024-02-08Add automatic MTU detectionSebastian Holmin1-0/+103
2024-02-08Add `set_mtu` for linuxSebastian Holmin1-0/+2
2024-02-08Move constantsSebastian Holmin1-6/+4
2024-01-31Simplify retry logic in connecting stateDavid Lönnhager1-1/+33