summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/api.rs
AgeCommit message (Collapse)AuthorFilesLines
2023-10-09Add naming custom access methodsMarkus Pettersson1-1/+2
Just a bookkeeping feature for the end user
2023-10-09Minor code cleanupMarkus Pettersson1-3/+1
- Fix removal of API access methods from daemon settings When removing an API access method, we now compare the ID (hash) of the "access method-to-remove" with the access methods stored in the daemon settings. This is because using the `==`/`!=` operator on two similiar `AccessMethod`s only differing in the `enabled` field will be different from hashing the objects and comparing those instead. The hash does not consider the `enabled` field in its calculation.
2023-10-09Add `mullvad api-access enable/disable`Markus Pettersson1-2/+2
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-09Allowing traffic to and from a SOCKS5-proxy running on localhost.Markus Pettersson1-29/+57
The daemon has to add a rule to allow traffix to/from the remote server which the locally running SOCKS5-proxy communicates with.
2023-10-09Code cleanupMarkus Pettersson1-23/+46
- 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-05-24Fix warnings pointed out by ClippyLinus Färnstrand1-1/+4
2022-06-13Perform a clippy --fixjonathan1-2/+2
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-10Move state-forwarding functions for the API client to the apiDavid Lönnhager1-1/+39
module in mullvad-daemon
2022-04-26Pass relay selector handle directly to "connection mode provider"David Lönnhager1-44/+9
2022-04-26Return bridge from get_relay()David Lönnhager1-1/+1
2022-04-26Decouple API bridge selection from the daemonDavid Lönnhager1-43/+125
2022-03-28Don't update allowed endpoint twiceDavid Lönnhager1-7/+4
2022-03-23Rename mullvad-rpc to mullvad-apiDavid Lönnhager1-2/+2
2022-03-07Move API endpoint update handling to api moduleDavid Lönnhager1-4/+83
2022-03-01Add proxy config generator to daemonDavid Lönnhager1-0/+54