From 2e066ff0b85d666cf589466990c1f81c39b742eb Mon Sep 17 00:00:00 2001 From: James McMurray Date: Sun, 12 Sep 2021 10:10:42 +0200 Subject: [PATCH 1/2] Increase logfile buffer size for OpenVPN And do not clear the buffer to prevent splitting on the messages we need https://github.com/jamesmcm/vopono/issues/102 --- src/openvpn.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openvpn.rs b/src/openvpn.rs index 5a7319c..4c34ca6 100644 --- a/src/openvpn.rs +++ b/src/openvpn.rs @@ -74,7 +74,7 @@ impl OpenVpn { .exec_no_block(&command_vec, None, true, false, Some(working_dir)) .context("Failed to launch OpenVPN - is openvpn installed?")?; let id = handle.id(); - let mut buffer = String::with_capacity(1024); + let mut buffer = String::with_capacity(16384); let mut logfile = BufReader::with_capacity(64, File::open(log_file_str)?); let mut pos: usize = 0; @@ -112,7 +112,6 @@ impl OpenVpn { } logfile.seek(SeekFrom::Start(pos as u64)).unwrap(); - buffer.clear(); } if buffer.contains("AUTH_FAILED") { From 5fdb07189949aeb26ae516192f83542deae831e3 Mon Sep 17 00:00:00 2001 From: James McMurray Date: Sun, 12 Sep 2021 10:11:59 +0200 Subject: [PATCH 2/2] Bump version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8a303c7..d0f8a3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vopono" description = "Launch applications via VPN tunnels using temporary network namespaces" -version = "0.8.4" +version = "0.8.5" authors = ["James McMurray "] edition = "2018" license = "GPL-3.0-or-later"