summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src/cmds/relay.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin1-7/+7
2025-06-24Enable support for creating a custom list with locationsJonatan Rhodin1-2/+2
2025-06-09Add `AllowedIps` setting to CLISebastian Holmin1-7/+5
2025-03-05Remove automatic tunnel typeDavid Lönnhager1-20/+11
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-02-12Format workspaceSebastian Holmin1-22/+25
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-12Run `cargo +beta fix --edition`Sebastian Holmin1-4/+4
2024-11-28Fix clippy warningsMarkus Pettersson1-1/+0
2024-09-17Remove daita cfg from mullvad-cliJoakim Hulthe1-1/+0
2024-09-17Remove Option from Relay::locationJoakim Hulthe1-14/+9
2024-08-16Use range types for all port rangesDavid Lönnhager1-1/+1
Breaks backwards compatibility with relays.json (which is acceptable)
2024-06-25Add `daita` as a Cargo cfg variableMarkus Pettersson1-1/+1
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build files per platform.
2024-06-25Enable DAITA for linux in CLI and typesSebastian Holmin1-1/+1
2024-04-16Add DAITA Windows client and updated tuncfgDavid Lönnhager1-0/+2
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson1-4/+5
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.
2023-11-23Add subcommand level `entry` to `wireguard`Sebastian Holmin1-11/+18
The command `relay set tunnel wireguard entry-location` is replaced with `relay set tunnel wireguard entry location` and `relay set tunnel wireguard custom-list` is replaced with `relay set tunnel wireguard entry custom-list`. This is intended to communicate that the `custom-list` also affects the entry relay and are mutually exclusive.
2023-11-23Add `resolve_location_constraint` fnSebastian Holmin1-69/+111
The fn exists and returns error on hostname having wrong server type. Allow any host in custom-lists, only the currently configured tunnel protocol for `relay set location`, only bridges for the `bridge` subcommand and only wireguard servers in for the `wireguard` entry command. Reduce repeated init of rpc client Refactor inconsistent filtering on hostname
2023-11-23Simplify relay filter fnSebastian Holmin1-31/+31
Refactor: Unwrap result return type Refactor: for loop to iter map
2023-11-13Warn if setting relay overrides for non-existent hostname in the CLIDavid Lönnhager1-17/+38
2023-11-13Add CLI for relay overridesDavid Lönnhager1-4/+199
2023-10-31Replace UpdateRelaySettings with SetRelaySettingsDavid Lönnhager1-35/+43
2023-09-27Refactor custom list implementationDavid Lönnhager1-3/+7
2023-08-30Fix clippy lintsEmīls1-3/+2
2023-08-21Decouple `get_filtered_relays` from `mullvad_cli::relay::Relay`Markus Pettersson1-31/+32
To be able to more easily re-use `get_filtered_relays` from other modules, such as `custom_lists`, the function was to the module level.
2023-08-21Add macro for indenting options in the CLIDavid Lönnhager1-30/+16
2023-08-21Improve presentation of relay settings in the CLIDavid Lönnhager1-6/+84
2023-06-29Add settings migration code, refactor and cleanupJonathan1-3/+3
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
2023-06-29Cleanup review comments, CI issues and android supportJonathan1-16/+20
Add necessary android support to allow it to not crash due to interface changes. Format the code, remove redundant async functions, fix android issues related to not having to use a Vec to store the custom lists and a string as an id. Fix unit tests.
2023-06-29Add basic features for custom list and file persistenceJonathan1-12/+43
Create the basic features outside of rename for custom lists and route these to the daemon. Persist custom lists in settings. Has basic custom list features done, adds errors. Adds reconnect in the case where a selected custom list is modified.
2023-06-21Add smarter bridge location constraint selectionMarkus Pettersson1-1/+1
Add the same location constraint logic as `relay set location` to the bridge location constraint for the `bridge set location` command. This implies that the relay selection for both work in the same way.
2023-06-21Add doc-comment to `get_filtered_relays`Markus Pettersson1-0/+1
2023-06-21Add smarter entry location constraint selection to multihopMarkus Pettersson1-1/+27
Add the same location constraint logic as `relay set location` to the entry location constraint for multihop. This implies that the relay selection for both work in the same way.
2023-06-21Make `mullvad relay set location` smarterMarkus Pettersson1-23/+74
The `set location` command now takes a hostname and figures the country and city out. This is identical to how the (now deprecated) `mullvad relay set hostname` used to work. The `set location` command will try to resolve country code first, but if that fails we now fall back to trying to resolve a relay by hostname first. Update the help message (long & short) to cover this new use case.
2023-06-21Remove `mullvad relay set hostname` commandMarkus Pettersson1-39/+4
2023-05-22Trim private key input correctlyDavid Lönnhager1-1/+2
2023-05-03Overthink boolean optionsDavid Lönnhager1-5/+5
2023-05-03Replace error handling in mullvad-cli with anyhowDavid Lönnhager1-6/+5
2023-05-03Clean up conversion from base64 to key typesDavid Lönnhager1-7/+5
2023-05-03And gRPC interface wrapper and refactor CLI to use clap derive instead of ↵David Lönnhager1-739/+473
the builder
2023-02-28Allow cli to turn on PQ while MH is onJonathan1-20/+0
2023-02-21Make quantum-resistant tunnel optional in mullvad layerDavid Lönnhager1-3/+7
2023-01-30Run `cargo clippy --fix` with the new Rust 1.67 preferred formatLinus Färnstrand1-1/+1
2022-09-27Fix clippy complaintsEmīls Piņķis1-5/+5
2022-07-11Validate WireGuard port selection in the CLIDavid Lönnhager1-2/+20
2022-07-11Return RelayList object instead of a stream in proto fileDavid Lönnhager1-2/+2
2022-07-07Update CLI to handle new relay typeDavid Lönnhager1-10/+4
2022-06-27Only check multihop state when enabling PQDavid Lönnhager1-3/+3
2022-06-14Add option for enabling PQ PSK exchange to CLI and gRPC serviceDavid Lönnhager1-1/+18
2022-06-13Perform a clippy --fixjonathan1-1/+1
This is a giant commit which performs only a clippy --fix. Auditing can happen in two ways, either by reading every line or by running a `cargo clippy --fix` on the previous commit and make sure that the result is the same.
2022-05-09Add server ownership constraint to the daemon and CLIDavid Lönnhager1-1/+43
2022-03-24Adjust relay command in CLIOdd Stranne1-21/+6