summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src
AgeCommit message (Collapse)AuthorFilesLines
2023-10-09Add `mullvad proxy use`Markus Pettersson1-4/+31
Allow for settings a specific Access Method to use
2023-10-09Pretty print custom access methodsMarkus Pettersson1-7/+77
`mullvad proxy list` will now pretty print all configured access methods in a human-readable way
2023-10-09Add naming custom access methodsMarkus Pettersson1-4/+24
Just a bookkeeping feature for the end user
2023-10-09Add `mullvad api-access enable/disable`Markus Pettersson1-7/+72
Add `mullvad api-access enable/disable`, which allows for toggling API access methods On/Off. Make `ApiConnectionModeProvider` consider status of access method. `ApiConnectionModeProvider` will only be able to return access methods which are enabled, as it will disregard those which are disabled. Add logic to guarantee the invariant that at least one API access method is available for selection by the `ApiConnectionModeProvider`
2023-10-09Code cleanupMarkus Pettersson1-43/+41
- Add a new datastructures for distinguishing between built-in & custom api access methods - Implement `TryFrom` instead of `From` for fallible conversions - Do not panic if a protobuf-message is ill-formatted - Do not allow removal of built-in api access methods - Refactor notification logic in `access_methods.rs` - Rename `mullvad proxy api` to simply `mullvad proxy` - Since there are no other kinds of proxies at the moment, the subcommand `proxy api` does not make much sense. - Remove left-over comments
2023-10-09Add `mullvad proxy api edit` commandMarkus Pettersson1-6/+100
Allow a user to edit an existing custom api proxy method
2023-10-09Add `mullvad proxy api remove` commandMarkus Pettersson1-5/+37
Allow the user to manually remove a custom api proxy.
2023-10-09Add `mullvad proxy add` commandMarkus Pettersson1-21/+105
Add daemon logic for storing custom access methods & allow a user to add a custom socks5 or shadowsocks proxy. Add all the necessary information for establishing Socks5 connections (both using a local Socks-proxy as well as the normal, remote-proxy, use case) and Shadowsocks connections. Add `api_access_settings` to `mullvad-daemon` Naturally, the Protobuf types has to be mirrored on the Rust/daemon side and lots of boilerplate code had to be written to convert between the two.
2023-10-09Add `mullvad proxy` commandMarkus Pettersson3-0/+103
The `proxy` subcommand will allow for adding/deleting/editing/showing different API access methods using the mullvad CLI.
2023-09-27Refactor custom list implementationDavid Lönnhager5-18/+51
2023-09-20Add social media blocklists to daemon+CLILinus Färnstrand1-0/+12
When infra has deployed these block lists to the relays, this setting will allow blocking social media domains directly with the app
2023-09-05Remove forwarded port from devices in Rust codeLinus Färnstrand1-6/+0
2023-08-30Fix clippy lintsEmīls1-3/+2
2023-08-21Add servers to a custom list by hostnameMarkus Pettersson1-2/+7
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-21Pretty print country/city names instead of just their codesMarkus Pettersson1-6/+77
Create meta type for pretty printing `GeographicLocationConstraint` which is used for adding long country/city names to the output of the `custom-list` cli command.
2023-08-21Do not print redundant custom list nameMarkus Pettersson1-3/+7
If the user wants to print a single list using `mullvad custom-list list <name>`, the name of the list does not need to be part of the pretty print.
2023-08-21Re-arrange `mullvad custom-list` subcommandsMarkus Pettersson1-14/+38
Re-arrange most of the subcommands of `mullvad custom-list` to decrease clutter. This includes both re-ordering the different subcommands as well as moving some subcommands to a new umbrella subcommand `mullvad custom-list edit`. The subcommands under `mullvad custom-list edit` operate on a single custom list, i.e. appending to/renaming/deleting from a custom list. The other subcommands under `mullvad custom-list` operate on the global set of lists instead.
2023-08-21Unify `mullvad custom-list` subcommands `get` and `list`Markus Pettersson1-7/+12
`mullvad custom-list list` now optionally takes an argument: A name of a custom list to retrieve.
2023-08-21Rename cli command `mullvad custom-lists` to `mullvad custom-list`Markus Pettersson1-2/+2
The `custom-list` subcommand is now in singular form, rather than plural.
2023-08-21Add macro for indenting options in the CLIDavid Lönnhager3-57/+49
2023-08-21Implement formatter for constraintsDavid Lönnhager1-6/+10
2023-08-21Improve presentation of relay settings in the CLIDavid Lönnhager1-6/+84
2023-06-29Add settings migration code, refactor and cleanupJonathan3-5/+5
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 supportJonathan4-31/+33
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 persistenceJonathan6-36/+215
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 Pettersson2-4/+33
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-06-21Print the old account number even if device is revokedMarkus Pettersson1-0/+3
`mullvad account get` will print the old account number, even when the device has revoked.
2023-06-08Improve UX of CLI when user connects while not logged inMarkus Pettersson2-1/+50
If the user is *not* logged in to an active account, we will from now on issue a warning if they try to connect to a relay using `mullvad-cli`. Previously, we would silently just start blocking all internet traffic. This is well and good, as this is mandated by the state machine model. The huge issue is that the user was unaware about the current status of their connection without running further CLI commands or checking the GUI. As this is to be considered a frustrating edge case, we might as well try to help the user, since they can't look for answers on the world wide web.
2023-05-24Add tunnel interface to output of `mullvad status`Markus Pettersson1-0/+5
Print the name of the tunnel interface when the app is in a connected state and the user requests verbose output by running `mullvad status -v`. To accomplish this, the state machine needs attach more metadata about the tunnel state when transitioning to the `Connected` state than prior to this change.
2023-05-24Print `mullvad-app` version even if `mullvad-daemon` is downMarkus Pettersson1-9/+18
Previously, if `mullvad-cli` could not establish a connection to `mullvad-daemon` for any reason, running `mullvad version` would not print any version information whatsoever. Now we do print the current build version of `mullvad-app`, which may or may not be in sync with the installed version of `mullvad-daemon`. We use the `mullvad-version` crate to figure out an appropriate response in case `mullvad-daemon` is down.
2023-05-22Use non-blocking I/O for account token inputDavid Lönnhager1-1/+11
2023-05-22Trim private key input correctlyDavid Lönnhager1-1/+2
2023-05-03Overthink boolean optionsDavid Lönnhager8-92/+103
2023-05-03Replace error handling in mullvad-cli with anyhowDavid Lönnhager17-139/+59
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önnhager25-3012/+1887
the builder
2023-04-26Fix remaining clippy warningsDavid Lönnhager2-2/+2
2023-03-27Fix many typosAlexander Seiler3-3/+3
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
2023-02-28Allow cli to turn on PQ while MH is onJonathan2-41/+0
2023-02-21Make quantum-resistant tunnel optional in mullvad layerDavid Lönnhager2-11/+34
2023-01-30Remove "EXPERIMENTAL" from the quantum-resistant-tunnel CLI commandLinus Färnstrand1-1/+1
We still don't expose it in the UI. But we are now using the supposedly stable endpoint on the servers. It has worked really well so far, so we can probably be a bit less alarmist about it.
2023-01-30Run `cargo clippy --fix` with the new Rust 1.67 preferred formatLinus Färnstrand10-27/+27
2022-11-29Parse new AuthFailed error correctly in the CLIDavid Lönnhager1-1/+21
2022-11-07Split up talpid-coreEmīls Piņķis1-0/+2
2022-10-21Change name from always require VPN to Lockdown mode in CLIOskar Nyberg1-4/+4