summaryrefslogtreecommitdiffhomepage
path: root/talpid-openvpn
AgeCommit message (Collapse)AuthorFilesLines
2025-10-03Update winregDavid Lönnhager1-1/+1
2025-10-03Bump windows-sys version to latestDavid Lönnhager1-4/+9
This also refactors and documents some code
2025-09-08Fix lint `clippy::implicit_clone`Markus Pettersson1-2/+2
2025-07-15Fix `collapsible_if` clippy lintMarkus Pettersson2-15/+15
2025-07-11Fix lint `unused_parens`Markus Pettersson1-1/+1
2025-07-10Run `cargo fmt`Sebastian Holmin4-25/+22
2025-07-09Use `io:Error::other`Sebastian Holmin2-8/+6
2025-07-09Put the `tonic::Status` in a Box to make the error type smallerSebastian Holmin1-1/+2
2025-07-04Make `talpid-openvpn` compileMarkus Pettersson1-0/+2
Add missing feature to dependency of `tokio-parity-ipc`.
2025-03-19Set MTU on IPv6 interface for wireguard-nt only if IPv6 is enabledDavid Lönnhager1-1/+1
2025-03-18Replace to_owned with clone where that's implicitly what was going onLinus Färnstrand1-1/+1
2025-02-25Fix improper pointer provenanceJoakim Hulthe1-2/+5
`&mut buffer[0] as *mut u8` will create a raw pointer that is only allowed to access the very first byte of `buffer`. `slice::as_mut_ptr` is preferred.
2025-02-25Allow undocumented_unsafe_blocks in some modulesJoakim Hulthe1-0/+2
2025-02-25Add safety comment in talpid_openvpnJoakim Hulthe1-0/+1
2025-02-12Format workspaceSebastian Holmin1-4/+4
The 2024 edition contains new formatting rules. All of these are not compatible with the 2021 formatting style, but most of them are. To change the formatting to be as close to the new style as possible while remaining compatible with the 2021 edition, I first ran `cargo +beta fmt` with the edition set to 2024, then, with the edition set to 2021, I ran `cargo fmt`.
2025-02-12Fix `unsafe_op_in_unsafe_fn` warningSebastian Holmin1-8/+10
2025-02-12Fix miscellaneous lintsSebastian Holmin1-1/+1
2024-12-12Remove some deprecated ref patternsJoakim Hulthe1-4/+4
2024-12-02Replace generic with new typeSebastian Holmin1-33/+31
2024-12-02Replace dyn fn with genericSebastian Holmin1-27/+8
2024-09-25Add `futures` to workspace dependenciesSebastian Holmin1-1/+1
2024-09-25Add `parity-tokio-ipc` to workspace dependenciesSebastian Holmin1-1/+1
Also regroup networking-related crates
2024-09-24Add fallback when failing to create `wintun` adapterSebastian Holmin1-17/+27
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2024-09-02Run `cargo +nightly clippy --fix`Markus Pettersson1-4/+2
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager2-6/+7
2024-08-21Fix flaky wait_closed testDavid Lönnhager1-17/+47
The test is inherently racy because the 'process' closes immediately and its future may resolve before the close handle stops the monitor
2024-04-25Update windows-sysJoakim Hulthe1-4/+2
2024-04-16Add missing `windows_sys` featureMarkus Pettersson1-0/+1
Fix `talpid-openvpn` refusing to compile for Windows due to a missing feature: `Win32_System_Com`. Fix `talpid-windows` refusing to compile for Windows due to a missing feature: `Win32_Security`.
2024-03-25Remove unused fieldMarkus Pettersson1-1/+5
Fix `dead-code` warning introduced by new nightly version of rustc
2024-03-14Simplify route manager handleDavid Lönnhager1-3/+3
2024-02-27Replace err_derive with thiserrorJoakim Hulthe3-34/+33
`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-7/+2
2024-02-06tonic_build::compile_protos() automatically prints rerun-if-changedAndrej Mihajlov1-3/+1
2024-01-31Simplify retry logic in connecting stateDavid Lönnhager1-0/+22
2024-01-16Add rust-version to all Cargo.tomlLinus Färnstrand1-0/+1
2024-01-12Validate SOCKS5 credentialsMarkus Pettersson1-2/+2
Validate SOCKS credentials by checking that both `username` and `password` both have a length between 1 and 255 bytes. Link to RFC detailing SOCKS5 username/password authentication: https://datatracker.ietf.org/doc/html/rfc1929
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-05Run `cargo +nightly fmt`Sebastian Holmin2-4/+3
2024-01-04Add workspace level lintsLinus Färnstrand2-1/+2
2024-01-03Allow app to use custom socks5 and shadwosocks proxiesJonathan4-78/+94
This PR has a couple of different purposes - Allow users to use socks5 local proxies with the CLI without having to be root nor use split-tunneling. This only works for OpenVPN. - Unify the types used by different proxy parts of the codebase, such as the Access Methods as well as some already existing OpenVPN proxy code. This PR changes the firewall on all desktop platforms as well as changes the routing table slightly on MacOS and Windows. On Linux the firewall code is modified to apply the appropriate firewall marks to all packages that go to a remote endpoint corresponding to the remote part of a local socks5 proxy. The firewall marks will allow the routing to be done without having to modify the routing table. On MacOS and Windows the routing table is modified to allow packages to go to that same endpoint to pass outside the VPN tunnel, it will additionally punch a hole in the firewall. The PR also migrates the settings file from version 7 to version 8 in order to properly and neatly unify Proxy related types. Finally it provides some slight extensions to the gRPC interface in order to allow for control over the custom proxy settings.
2024-01-02Fix clippy lintsDavid Lönnhager1-1/+1
2023-10-20Move talpid-windows-net into talpid-windowsDavid Lönnhager2-7/+8
2023-10-20Remove pointless locks from wintunDavid Lönnhager1-26/+11
2023-10-12Update OpenVPN monitorDavid Lönnhager3-257/+170
2023-10-11Get rid of nested `Arc`sMarkus Pettersson1-5/+5
2023-10-11Refactor test cases which use a `tokio` runtimeMarkus Pettersson1-90/+59
Prefer to use the `tokio::test` attribute which ships with `tokio` instead of manually creating a runtime for each test which needs it.
2023-10-11Remove dependency on `duct`Markus Pettersson5-154/+121
Remove the dependency on `duct` from `talpid-openvpn`, since we can use `tokio` to spawn processes instead.
2023-10-11Make `once_cell` a workspace dependencyMarkus Pettersson1-1/+1
2023-10-11Remove dependency `is-terminal` from `talpid-openvpn`Markus Pettersson2-2/+1
`std::io::IsTerminal` has been since Rust `1.70`, which allows us to migrate away from `is_terminal::IsTerminal`.
2023-09-11Move log depedency to workspace toml fileDavid Lönnhager1-1/+1