diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-10-13 20:30:28 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-10-13 20:30:28 +0200 |
| commit | 6f9f51cd4287cb5446997cc48330e7a00383d29e (patch) | |
| tree | ebce2b8d48f9a9bfb56438f22bfbaa75204af05a | |
| parent | 69ac056634446b75f870dfd58413c181cc54e1a8 (diff) | |
| parent | 0e6ea53759d4d0deb0583591bcb15c71af7adac2 (diff) | |
| download | mullvadvpn-6f9f51cd4287cb5446997cc48330e7a00383d29e.tar.xz mullvadvpn-6f9f51cd4287cb5446997cc48330e7a00383d29e.zip | |
Merge branch 'use-newer-openvpn-plugin'
| -rw-r--r-- | Cargo.lock | 12 | ||||
| -rw-r--r-- | appveyor.yml | 4 | ||||
| -rw-r--r-- | talpid-core/Cargo.toml | 2 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/Cargo.toml | 2 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/src/lib.rs | 12 |
5 files changed, 17 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock index fb3007dc3b..2f3726f63b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -804,12 +804,11 @@ dependencies = [ [[package]] name = "openvpn-plugin" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1016,6 +1015,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -1193,7 +1195,7 @@ dependencies = [ "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openvpn-plugin 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "openvpn-plugin 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "pfctl 0.1.0 (git+https://github.com/mullvad/pfctl-rs?rev=35ca17308409ffab07e3a2a7c9c9ba3c81f8ee5e)", "socket-relay 0.1.0", "talpid-ipc 0.1.0", @@ -1226,7 +1228,7 @@ dependencies = [ "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openvpn-plugin 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "openvpn-plugin 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "talpid-ipc 0.1.0", ] @@ -1580,7 +1582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum openssl 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)" = "085aaedcc89a2fac1eb2bc19cd66f29d4ea99fec60f82a5f3a88a6be7dbd90b5" "checksum openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7e3a9845a4c9fdb321931868aae5549e96bb7b979bf9af7de03603d74691b5f3" -"checksum openvpn-plugin 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "99c05a2229a24799412627dd22730729796aca97405dedc297a622536f37fb3b" +"checksum openvpn-plugin 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f01f94fa077e8648fa20c654f6aef90e1a0feae5455a7b5d80c19eadeb97c7e8" "checksum os_pipe 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "998bfbb3042e715190fe2a41abfa047d7e8cb81374d2977d7f100eacd8619cb1" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "37f364e2ce5efa24c7d0b6646d5bb61145551a0112f107ffd7499f1a3e322fbd" diff --git a/appveyor.yml b/appveyor.yml index 7161c2a028..6e5638c9e9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,8 +43,8 @@ install: # This is the "test phase", tweak it as you see fit test_script: - - cargo build --target %TARGET% - - cargo test --target %TARGET% + - cargo build + - cargo test # Cache build binaries for faster builds next time cache: diff --git a/talpid-core/Cargo.toml b/talpid-core/Cargo.toml index a5073bce4a..20a67b912b 100644 --- a/talpid-core/Cargo.toml +++ b/talpid-core/Cargo.toml @@ -14,7 +14,7 @@ lazy_static = "0.2" log = "0.3" uuid = { version = "0.5", features = ["v4"] } -openvpn-plugin = { version = "0.2", features = ["serialize"] } +openvpn-plugin = { version = "0.3", features = ["serde"] } talpid-ipc = { path = "../talpid-ipc" } talpid-types = { path = "../talpid-types" } diff --git a/talpid-openvpn-plugin/Cargo.toml b/talpid-openvpn-plugin/Cargo.toml index 65dac3133d..4b3a11b432 100644 --- a/talpid-openvpn-plugin/Cargo.toml +++ b/talpid-openvpn-plugin/Cargo.toml @@ -13,5 +13,5 @@ error-chain = "0.11" log = "0.3" env_logger = "0.4" -openvpn-plugin = { version = "0.2", features = ["serialize", "log"] } +openvpn-plugin = { version = "0.3", features = ["serde", "log"] } talpid-ipc = { path = "../talpid-ipc" } diff --git a/talpid-openvpn-plugin/src/lib.rs b/talpid-openvpn-plugin/src/lib.rs index 5212c83161..4449814e31 100644 --- a/talpid-openvpn-plugin/src/lib.rs +++ b/talpid-openvpn-plugin/src/lib.rs @@ -58,13 +58,13 @@ openvpn_plugin!( ); fn openvpn_open( - args: &[CString], - _env: &HashMap<CString, CString>, + args: Vec<CString>, + _env: HashMap<CString, CString>, ) -> Result<(Vec<OpenVpnPluginEvent>, EventProcessor)> { env_logger::init().chain_err(|| "Failed to bootstrap logging system")?; debug!("Initializing plugin"); - let core_server_id = parse_args(args)?; + let core_server_id = parse_args(&args)?; info!("Connecting back to talpid core at {}", core_server_id); let processor = EventProcessor::new(core_server_id).chain_err(|| ErrorKind::InitHandleFailed)?; @@ -89,14 +89,14 @@ fn openvpn_close(_handle: EventProcessor) { fn openvpn_event( event: OpenVpnPluginEvent, - _args: &[CString], - env: &HashMap<CString, CString>, + _args: Vec<CString>, + env: HashMap<CString, CString>, handle: &mut EventProcessor, ) -> Result<EventResult> { debug!("Received event: {:?}", event); let parsed_env = - openvpn_plugin::ffi::parse::env_utf8(env).chain_err(|| ErrorKind::ParseEnvFailed)?; + openvpn_plugin::ffi::parse::env_utf8(&env).chain_err(|| ErrorKind::ParseEnvFailed)?; handle .process_event(event, parsed_env) |
