summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src/cmds/bridge.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin1-1/+1
2025-06-24Enable support for creating a custom list with locationsJonatan Rhodin1-1/+1
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson1-2/+3
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-01-12Validate SOCKS5 credentialsMarkus Pettersson1-2/+2
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-03Allow app to use custom socks5 and shadwosocks proxiesJonathan1-201/+149
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-11-23Add `resolve_location_constraint` fnSebastian Holmin1-11/+10
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-09-27Refactor custom list implementationDavid Lönnhager1-1/+2
2023-08-21Implement formatter for constraintsDavid Lönnhager1-6/+10
2023-06-29Add settings migration code, refactor and cleanupJonathan1-1/+1
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-10/+11
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-18/+28
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-3/+32
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-05-03Replace error handling in mullvad-cli with anyhowDavid Lönnhager1-2/+1
2023-05-03And gRPC interface wrapper and refactor CLI to use clap derive instead of ↵David Lönnhager1-374/+250
the builder
2023-01-30Run `cargo clippy --fix` with the new Rust 1.67 preferred formatLinus Färnstrand1-1/+1
2022-11-07Split up talpid-coreEmīls Piņķis1-0/+2
2022-10-17Split gRPC conversions into submodules analogous to modules in the types cratesDavid Lönnhager1-6/+11
2022-09-27Fix clippy complaintsEmīls Piņķis1-2/+2
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-2/+1
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-3/+43
2022-04-14Clarify that `mullvad bridge` also affects API connectivityLinus Färnstrand1-1/+2
2022-04-14Improve help text for bridge and obfuscation subcommandsLinus Färnstrand1-1/+5
2022-02-14Upgrade clap to 3.0David Lönnhager1-74/+58
2022-02-04Update the default password and cipher for the custom bridgesLinus Färnstrand1-2/+2
We recently changed the cipher from chacha20 -> aes-256-gcm and the password from 23#dfsbbb to mullvad on port 443 on all our shadowsocks bridges
2022-01-11Use ": " as delimiter instead of " - " between messages and valueLinus Färnstrand1-2/+2
2021-11-29Reformat code without blank_lines_upper_bound = 2Linus Färnstrand1-1/+0
2021-09-27Deduplicate formatting in bridge CLIDavid Lönnhager1-78/+57
2021-05-17Add exit location CLI optionDavid Lönnhager1-1/+1
2021-03-31Explain firewall restrictions for local custom proxy optionDavid Lönnhager1-22/+39
2021-02-11Fix deprecated panic formattingDavid Lönnhager1-3/+3
2021-02-10Update CLI to handle multiple providersDavid Lönnhager1-15/+16
2021-01-28Rename GrpcClientErrorDavid Lönnhager1-1/+1
2021-01-28Specify exactly what failed in the CLI when multiple RPCs may failDavid Lönnhager1-2/+6
2020-12-01Name arguments that can be on or off consistentlyDavid Lönnhager1-2/+2
2020-08-25List hosting providers for bridge servers in CLIDavid Lönnhager1-1/+4
2020-08-25Add bridge provider constraintDavid Lönnhager1-7/+63
2020-08-20Add mullvad-management-interface crate for IPC types and functionsDavid Lönnhager1-10/+10
2020-08-20Use gRPC for management interface in backend and CLIDavid Lönnhager1-93/+125
2020-04-22Replace simple getters with direct field accessJanito Vaqueiro Ferreira Filho1-1/+1
2019-09-17Sort countries, cities and relays with natural sorting in CLILinus Färnstrand1-3/+3
2019-09-13Sort bridge/relay list output on hostname as well in CLILinus Färnstrand1-1/+3
2019-09-13Print out relay hostnames in CLI relay/bridge list commandLinus Färnstrand1-0/+3
2019-09-13Sort countries/cities on lowercase names in CLILinus Färnstrand1-3/+8
2019-09-13Filter relays on the new "active" flag in the CLILinus Färnstrand1-1/+2
2019-07-16Mark bridge state as required argumentLinus Färnstrand1-0/+1
2019-07-05Fix typo in CLI (brigde to bridge)Emīls Piņķis1-1/+1
2019-05-28Add bridge subcommandEmīls Piņķis1-0/+354