Skip to content

Commit

Permalink
Fix windows compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jontified committed Jan 2, 2024
1 parent e6cebfa commit 69481a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions talpid-core/src/tunnel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use talpid_openvpn;
use talpid_routing::RouteManagerHandle;
pub use talpid_tunnel::{TunnelArgs, TunnelEvent, TunnelMetadata};
#[cfg(not(target_os = "android"))]
use talpid_types::net::proxy;
use talpid_types::net::openvpn as openvpn_types;
use talpid_types::net::{wireguard as wireguard_types, TunnelParameters};

/// A module for all WireGuard related tunnel management.
Expand Down Expand Up @@ -109,14 +109,14 @@ impl TunnelMonitor {
resource_dir: &path::Path,
params: &TunnelParameters,
) -> Option<path::PathBuf> {
use talpid_types::net::proxy::CustomProxy;

let resource_dir = resource_dir.to_path_buf();
match params {
TunnelParameters::OpenVpn(params) => match &params.proxy {
Some(proxy::CustomProxy::Shadowsocks(_)) => Some(std::env::current_exe().unwrap()),
Some(proxy::CustomProxy::Socks5Local(_)) => None,
Some(proxy::CustomProxy::Socks5Remote(_)) | None => {
Some(resource_dir.join("openvpn.exe"))
}
Some(CustomProxy::Shadowsocks(_)) => Some(std::env::current_exe().unwrap()),
Some(CustomProxy::Socks5Local(_)) => None,
Some(CustomProxy::Socks5Remote(_)) | None => Some(resource_dir.join("openvpn.exe")),
},
_ => Some(std::env::current_exe().unwrap()),
}
Expand Down

0 comments on commit 69481a6

Please sign in to comment.