summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src/cmds
AgeCommit message (Collapse)AuthorFilesLines
2024-11-28Fix clippy warningsMarkus Pettersson1-1/+0
2024-10-07Rename "smart routing" to "direct only" in the APISebastian Holmin1-9/+9
Also invert the behavior
2024-10-01Rename account "token" to account "number"Joakim Hulthe1-17/+17
2024-09-17Align Smart routing GUI with design specJoakim Hulthe1-8/+9
2024-09-17Remove daita cfg from mullvad-cliJoakim Hulthe2-12/+2
2024-09-17Add daita.enabled and daita.use_anywhere rpc callsJoakim Hulthe1-8/+17
2024-09-17Remove Option from Relay::locationJoakim Hulthe1-14/+9
2024-09-17Add `use_anywhere` daita settingJoakim Hulthe1-2/+5
2024-09-16Refactor `mullvad status listen` commandSebastian Holmin2-40/+10
2024-09-02Run `cargo +nightly clippy --fix`Markus Pettersson1-6/+3
2024-08-26Add CLI for Shadowsocks obfuscationDavid Lönnhager1-4/+20
2024-08-16Use range types for all port rangesDavid Lönnhager1-1/+1
Breaks backwards compatibility with relays.json (which is acceptable)
2024-08-07Add --json flag to `mullvad status`Joakim Hulthe1-20/+36
2024-08-01Implement feature indicators in daemonJoakim Hulthe1-3/+9
- Add a GetFeatureIndicators gRPC call that get's the current set of active "features" that should be shown in the UI. - Extend the TunnelState with a FeatureIndicators value. Clients who listens for TunnelState events will get updates automatically.
2024-07-18Fix burst daemon events being missedSebastian Holmin1-1/+2
The daemon event stream was reset between every item, which caused events that arrive while the previous item is being handled to be missed.
2024-07-04Trim custom list name and limit len to 30 in cliJoakim Hulthe1-0/+19
2024-06-25Add `daita` as a Cargo cfg variableMarkus Pettersson2-8/+8
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build files per platform.
2024-06-25Enable DAITA for linux in CLI and typesSebastian Holmin2-8/+8
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin1-4/+2
2024-04-30Add initial split tunneling implementation for macOSDavid Lönnhager2-1/+90
2024-04-22Fix broken lints in rustdocsSebastian Holmin2-11/+11
I ran `cargo doc` and fixed as many broken links as I could find.
2024-04-16Add DAITA Windows client and updated tuncfgDavid Lönnhager2-1/+30
2024-04-03Enable single-use-lifetimes rustc lintLinus Färnstrand3-3/+3
Removes superfluous lifetime definitions. Simplifying the code
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson7-13/+19
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.
2024-02-28Make `block-connection` block even if disconnectedJoakim Hulthe1-0/+3
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-3/+3
`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-01-22Move logic of toggling disabled access methods on use to the daemonMarkus Pettersson1-6/+1
2024-01-18Update the tunnel state on lockdown mode change.Sebastian Holmin1-8/+17
The printing of lockdown mode by `mullvad status` does not reflect the current setting unless the tunnel state has also been updated.
2024-01-18Print if lockdown mode is enabled when disconnected for `mullvad status`Sebastian Holmin1-4/+7
Add `locked_down` field to disconnected tunnel state.
2024-01-12Validate SOCKS5 credentialsMarkus Pettersson3-85/+70
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-11Simplify CLI patch module slightlyDavid Lönnhager1-25/+19
2024-01-10Simplify JSON import and export in the CLIDavid Lönnhager1-106/+20
2024-01-10Add CLI export-settings commandDavid Lönnhager1-4/+49
2024-01-10Add patch export to the management interfaceDavid Lönnhager2-4/+4
2024-01-08Add new internal daemon event `AccessMethodEvent`Markus Pettersson1-0/+5
Add a new `InternalDaemonEvent` for announcing when the current API access method changes.
2024-01-05Run `cargo +nightly fmt`Sebastian Holmin2-4/+6
2024-01-03Allow app to use custom socks5 and shadwosocks proxiesJonathan4-389/+462
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.
2023-12-29Show account id in the CLI with 'mullvad account get -v'David Lönnhager1-10/+16
2023-12-21Handle am.i.mullvad.net with internal daemon eventSebastian Holmin1-3/+1
Add `geoip::GeoIpHandler`, which sends an `InternalDaemonEvent::LocationEvent` when the location arrives. It also handles aborting in-flight requests and retries.
2023-12-21Remove `GetCurrentLocation`.Sebastian Holmin1-43/+20
Make the daemon send two tunnel state updates, one with out IP being empty, and another with it being filled when am.i.mullvad.net responds. Update CLI for this change. Other front ends are left out.
2023-12-04Perform testing of access methods asynchronouslyMarkus Pettersson1-2/+2
Perform testing of access methods asynchronously in a separate `tokio` task as to not block the daemon from handling other daemon events during the testing window
2023-12-04Move access method testing logic to `mullvad-daemon`Markus Pettersson1-28/+13
Move access method testing logic to `mullvad-daemon`, which means that the implementation details of how the test works is opaque to whatever frontend which wants to issue a test of some (configured) access method.
2023-11-23Add `mullvad debug block-connection` commandSebastian Holmin2-2/+42
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-23Improve feedback and error handling for custom-listsSebastian Holmin1-12/+21
2023-11-23Add `resolve_location_constraint` fnSebastian Holmin3-94/+141
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-23Refactor match statementSebastian Holmin1-10/+7
2023-11-23Simplify relay filter fnSebastian Holmin1-31/+31
Refactor: Unwrap result return type Refactor: for loop to iter map
2023-11-17Add CLI interface for applying JSON settings patchesDavid Lönnhager2-0/+102
2023-11-13Warn if setting relay overrides for non-existent hostname in the CLIDavid Lönnhager3-19/+45