summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2021-05-07 15:37:29 +0200
committerDavid Lönnhager <david.l@mullvad.net>2021-07-02 09:54:19 +0200
commit22aeda50600fda08c86504d4430f7e6ca641d92e (patch)
treed4e9534ada9fbd59d8ecc7441bc9e884afaf557c /mullvad-daemon/src
parent993895622fe7d43f6dc1ef564775439e864f562f (diff)
downloadmullvadvpn-22aeda50600fda08c86504d4430f7e6ca641d92e.tar.xz
mullvadvpn-22aeda50600fda08c86504d4430f7e6ca641d92e.zip
Remove redundant GetSplitTunnelApps RPC
Diffstat (limited to 'mullvad-daemon/src')
-rw-r--r--mullvad-daemon/src/lib.rs14
-rw-r--r--mullvad-daemon/src/management_interface.rs30
2 files changed, 0 insertions, 44 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs
index c901d45767..698db84b53 100644
--- a/mullvad-daemon/src/lib.rs
+++ b/mullvad-daemon/src/lib.rs
@@ -265,9 +265,6 @@ pub enum DaemonCommand {
/// Clear list of processes excluded from the tunnel
#[cfg(target_os = "linux")]
ClearSplitTunnelProcesses(ResponseTx<(), split_tunnel::Error>),
- /// Request list of apps to exclude from the tunnel
- #[cfg(windows)]
- GetSplitTunnelApps(oneshot::Sender<HashSet<PathBuf>>),
/// Exclude traffic of an application from the tunnel
#[cfg(windows)]
AddSplitTunnelApp(ResponseTx<(), Error>, PathBuf),
@@ -1217,8 +1214,6 @@ where
#[cfg(target_os = "linux")]
ClearSplitTunnelProcesses(tx) => self.on_clear_split_tunnel_processes(tx),
#[cfg(windows)]
- GetSplitTunnelApps(tx) => self.on_get_split_tunnel_apps(tx),
- #[cfg(windows)]
AddSplitTunnelApp(tx, path) => self.on_add_split_tunnel_app(tx, path).await,
#[cfg(windows)]
RemoveSplitTunnelApp(tx, path) => self.on_remove_split_tunnel_app(tx, path).await,
@@ -1760,15 +1755,6 @@ where
Self::oneshot_send(tx, result, "clear_split_tunnel_processes response");
}
- #[cfg(windows)]
- fn on_get_split_tunnel_apps(&mut self, tx: oneshot::Sender<HashSet<PathBuf>>) {
- Self::oneshot_send(
- tx,
- self.settings.to_settings().split_tunnel.apps,
- "get_split_tunnel_apps response",
- );
- }
-
/// Update the split app paths in both the settings and tunnel
#[cfg(windows)]
async fn set_split_tunnel_paths(
diff --git a/mullvad-daemon/src/management_interface.rs b/mullvad-daemon/src/management_interface.rs
index 5bf5e3c61c..ed69f84838 100644
--- a/mullvad-daemon/src/management_interface.rs
+++ b/mullvad-daemon/src/management_interface.rs
@@ -54,7 +54,6 @@ impl ManagementService for ManagementServiceImpl {
type GetRelayLocationsStream =
tokio::sync::mpsc::Receiver<Result<types::RelayListCountry, Status>>;
type GetSplitTunnelProcessesStream = tokio::sync::mpsc::UnboundedReceiver<Result<i32, Status>>;
- type GetSplitTunnelAppsStream = tokio::sync::mpsc::UnboundedReceiver<Result<String, Status>>;
type EventsListenStream = EventsListenerReceiver;
// Control and get the tunnel state
@@ -645,35 +644,6 @@ impl ManagementService for ManagementServiceImpl {
}
}
- async fn get_split_tunnel_apps(
- &self,
- _: Request<()>,
- ) -> ServiceResult<Self::GetSplitTunnelAppsStream> {
- #[cfg(windows)]
- {
- log::debug!("get_split_tunnel_apps");
- let (tx, rx) = oneshot::channel();
- self.send_command_to_daemon(DaemonCommand::GetSplitTunnelApps(tx))?;
- let paths = rx.await.map_err(|_| Status::internal("internal error"))?;
-
- let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
- tokio::spawn(async move {
- for path in paths {
- let _ = tx.send(path.into_os_string().into_string().map_err(|os_path| {
- Status::internal(format!("failed to convert OS string: {:?}", os_path))
- }));
- }
- });
-
- Ok(Response::new(rx))
- }
- #[cfg(not(windows))]
- {
- let (_, rx) = tokio::sync::mpsc::unbounded_channel();
- Ok(Response::new(rx))
- }
- }
-
#[cfg(windows)]
async fn add_split_tunnel_app(&self, request: Request<String>) -> ServiceResult<()> {
log::debug!("add_split_tunnel_app");