| Age | Commit message (Collapse) | Author | Files | Lines |
|
In the upcoming re-design of select location, separate sets of filters
can now be picked for the entry and the exit relays. This commit adds
support for that in the relay selector.
In order to not affect the current behavior of the desktop and Android
apps before the new UI is implemented, the entry filters are set to the
same as the exit filters when the relay settings are updated via gRPC.
|
|
This also refactors and documents some code
|
|
- Renames block_when_disconnected to lockdown_mode
- Renames API access methods with non-unique names
Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
|
|
|
|
|
|
|
|
Do not modify closed migration code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
|
|
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
|
|
|
|
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`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
I ran `cargo doc` and fixed as many broken links as I could find.
|
|
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.
|
|
Make it not take a mut ref to the json value
|
|
|
|
- Change `selected_obfuscation` default to `auto`.
- Migrate `selected_obfuscation` from `off` to `auto` for existing users.
|
|
`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.
|
|
|
|
Change API access methods settings format to encode that built-in access
methods always exist by making them distinct values of the
`AccessMethod` settings.
This change was also propagated to the corresponding protobuf
definition, such that any client may make use of this fact as well.
The appropriate settings migration was added.
|
|
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
|
|
|
|
These lints where missed because the problems were inside tests.
Note that "targets" does not refer to OS/architectures.
```
> cargo build --help
...
Target Selection:
--lib Build only this package's library
--bins Build all binaries
--bin [<NAME>] Build only the specified binary
--examples Build all examples
--example [<NAME>] Build only the specified example
--tests Build all test targets
--test [<NAME>] Build only the specified test target
--benches Build all bench targets
--bench [<NAME>] Build only the specified bench target
--all-targets Build all targets
```
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
To align more with the upcoming standardizations within the Rust
ecosystem which started with the release of `1.70.0` and the inevitable
deprecation of `lazy_static`.
|
|
Gets rid of one usage of winapi in our dependency tree
|
|
Bump the settings version. Add code for migrating settings to new
version since it is now not backwards compatible.
Refactor LocationConstraint and related types to be more lean.
Cleanup issues and fix formatting.
Refactor LocationConstraint and add migration code
|
|
|