| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
Sets the default relay selection to the current country (as determined
by am.i.mullvad.net). If the current country does not have any relays
the country with the closest relay is choosen instead.
In non-release builds of the Android app we do not bundle a relay list
in the APK, and the relay list is fetched when the user logs in.
So one of the following can happen:
1. Geolocation request returns, we have a relay list.
2. Geolocation request returns, we do not yet have a relay list.
3. Relay list request returns, we have a geolocation.
4. Relay list request returns, we do not have a geolocation.
In 1. and 3. we can update the default location. In 2. we have to wait
until the relay list is fetched from the api until we can update the
default location. 4. is unlikely to happen but could happen if
am.i.mullvad is down.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
Removes superfluous lifetime definitions. Simplifying the code
|
|
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.
|
|
`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.
|
|
|
|
Implement `SettingsPersister.try_update`, which allow the caller to
signal a failed settings update, hindering a bad settings update from
being applied.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
Separate concerns of `SettingsPersister`'s error recovery and the
deserialization of `Settings` from file.
|
|
|
|
|
|
|