summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--talpid-core/src/process/openvpn.rs6
-rw-r--r--talpid-core/src/tunnel/openvpn.rs3
2 files changed, 9 insertions, 0 deletions
diff --git a/talpid-core/src/process/openvpn.rs b/talpid-core/src/process/openvpn.rs
index c3e7bfcf16..cf9ef4e1ce 100644
--- a/talpid-core/src/process/openvpn.rs
+++ b/talpid-core/src/process/openvpn.rs
@@ -173,6 +173,12 @@ impl OpenVpnCommand {
self
}
+ /// Sets the proxy settings.
+ pub fn proxy_settings(&mut self, proxy_settings: net::openvpn::ProxySettings) -> &mut Self {
+ self.proxy_settings = Some(proxy_settings);
+ self
+ }
+
/// Build a runnable expression from the current state of the command.
pub fn build(&self) -> duct::Expression {
log::debug!("Building expression: {}", &self);
diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs
index f6174c5e7c..f067a3908b 100644
--- a/talpid-core/src/tunnel/openvpn.rs
+++ b/talpid-core/src/tunnel/openvpn.rs
@@ -463,6 +463,9 @@ impl<C: OpenVpnBuilder + 'static> OpenVpnMonitor<C> {
cmd.tunnel_alias(Some(
crate::winnet::get_tap_interface_alias().map_err(Error::WinnetError)?,
));
+ if let Some(proxy_settings) = params.proxy.clone().take() {
+ cmd.proxy_settings(proxy_settings);
+ }
if let Some(proxy_auth_file) = proxy_auth_file {
cmd.proxy_auth(proxy_auth_file);
}